~fox1991/wicd/wicd-cli_fix

« back to all changes in this revision

Viewing changes to cli/wicd-cli.py

  • Committer: fox
  • Date: 2011-08-09 13:31:30 UTC
  • Revision ID: fox1991@gmail.com-20110809133130-3rv6ggkmyoj9hjbk
fixing exception for cli/wicd-cli.py --wireless -c

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
        op_performed = True
176
176
 
177
177
if options.connect:
 
178
        check = None
178
179
        if options.wireless and options.network > -1:
179
180
                is_valid_wireless_network_id(options.network)
180
181
                name = wireless.GetWirelessProperty(options.network, 'essid')
194
195
 
195
196
        # update user on what the daemon is doing
196
197
        last = None
197
 
        while check():
198
 
                next = message()
199
 
                if next != last:
200
 
                        # avoid a race condition where status is updated to "done" after the
201
 
                        # loop check
202
 
                        if next == "done":
203
 
                                break
204
 
                        print "%s..." % next.replace("_", " ")
205
 
                        last = next
206
 
        print "done!"
207
 
        op_performed = True
 
198
        if check is not None:
 
199
                while check():
 
200
                        next = message()
 
201
                        if next != last:
 
202
                                # avoid a race condition where status is updated to "done" after the
 
203
                                # loop check
 
204
                                if next == "done":
 
205
                                        break
 
206
                                print "%s..." % next.replace("_", " ")
 
207
                                last = next
 
208
                print "done!"
 
209
                op_performed = True
208
210
 
209
211
# pretty print optional and required properties
210
212
def str_properties(prop):