Handle cases for unknown network types
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 5 Jan 2009 22:03:53 +0000 (23:03 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 5 Jan 2009 22:03:53 +0000 (23:03 +0100)
test/list-networks

index 8b1ade1..f4d5075 100755 (executable)
@@ -25,9 +25,12 @@ for path in properties["Devices"]:
 
        properties = device.GetProperties()
 
-       if properties["Type"] not in ["wifi", "wimax",
+       try:
+               if properties["Type"] not in ["wifi", "wimax",
                                        "bluetooth", "cellular"]:
-               continue;
+                       continue
+       except:
+               continue
 
        print "[ %s ]" % (path)