Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing exception for cli/wicd-cli.py --wireless -c

  • Loading branch information...
commit f01dad5a5140cf92c9f71fcfd6ab1c0cdb37283e 1 parent 4cda470
fox authored
Showing with 13 additions and 11 deletions.
  1. +13 −11 cli/wicd-cli.py
24 cli/wicd-cli.py
View
@@ -175,6 +175,7 @@ def is_valid_wired_network_profile(profile_name):
op_performed = True
if options.connect:
+ check = None
if options.wireless and options.network > -1:
is_valid_wireless_network_id(options.network)
name = wireless.GetWirelessProperty(options.network, 'essid')
@@ -194,17 +195,18 @@ def is_valid_wired_network_profile(profile_name):
# update user on what the daemon is doing
last = None
- while check():
- next = message()
- if next != last:
- # avoid a race condition where status is updated to "done" after the
- # loop check
- if next == "done":
- break
- print "%s..." % next.replace("_", " ")
- last = next
- print "done!"
- op_performed = True
+ if check is not None:
+ while check():
+ next = message()
+ if next != last:
+ # avoid a race condition where status is updated to "done" after the
+ # loop check
+ if next == "done":
+ break
+ print "%s..." % next.replace("_", " ")
+ last = next
+ print "done!"
+ op_performed = True
# pretty print optional and required properties
def str_properties(prop):
Please sign in to comment.
Something went wrong with that request. Please try again.