Handle missing Name property when setting passphrase
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 28 Jun 2009 07:18:15 +0000 (09:18 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 28 Jun 2009 07:18:15 +0000 (09:18 +0200)
test/set-passphrase

index f80d754..a104416 100755 (executable)
@@ -29,6 +29,9 @@ for path in properties["Devices"]:
 
                properties = network.GetProperties()
 
-               if (properties["Name"] == sys.argv[1]):
+               if "Name" not in properties:
+                       continue
+
+               if properties["Name"] == sys.argv[1]:
                        print "Setting passphrase for %s" % (path)
                        network.SetProperty("WiFi.Passphrase", sys.argv[2])