properties = device.GetProperties()
- if (properties["Type"] != "wifi" and properties["Type"] != "wimax"):
- continue;
+ try:
+ if properties["Type"] not in ["wifi", "wimax",
+ "bluetooth", "cellular"]:
+ continue
+ except:
+ continue
print "[ %s ]" % (path)
print " [ %s ]" % (path)
for key in properties.keys():
- if (key == "WiFi.SSID"):
+ if key == "WiFi.SSID":
ssid = convert_ssid(properties[key])
print " %s = [ %s ]" % (key, ssid)
- elif (key == "WiFi.Strength"):
+ elif key in ["Strength", "Priority"]:
print " %s = %d" % (key, properties[key])
else:
print " %s = %s" % (key, properties[key])