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.
Sorry to re-open this, but I believe this is a bug in the Python script. The problem occurs here
if options.connect:
is_valid_ wireless_ network_ id(options. network) GetWirelessProp erty(options. network, 'essid') GetWirelessProp erty(options. network, 'enctype')
check = None
if options.wireless and options.network > -1:
name = wireless.
encryption = wireless.
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.