Comment 3 for bug 515045

Revision history for this message
Martin Fox (belden-fox) wrote :

Sorry to re-open this, but I believe this is a bug in the Python script. The problem occurs here

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')
        encryption = wireless.GetWirelessProperty(options.network, 'enctype')

The third line should read simply "if options.wireless:" without checking for a valid network. That check should be done by is_valid_wireless_network_id() which is called on the next line; that function will generate an appropriate error message and exit the script.