summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-03-26 01:59:15 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-03-26 01:59:15 -0700
commit3d5435d54aeffb22ffa27bfd2bd4ee78b237d65e (patch)
tree3402c135d9bb76eb692ca451b166894a5300e30a
parent08a8b7f6a025291e0641232d1e6a219b635500a6 (diff)
downloadconnman-3d5435d54aeffb22ffa27bfd2bd4ee78b237d65e.tar.gz
connman-3d5435d54aeffb22ffa27bfd2bd4ee78b237d65e.tar.bz2
connman-3d5435d54aeffb22ffa27bfd2bd4ee78b237d65e.zip
Fix handling of missing name property
-rwxr-xr-xtest/disconnect-network5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/disconnect-network b/test/disconnect-network
index 8529c19c..3bb235af 100755
--- a/test/disconnect-network
+++ b/test/disconnect-network
@@ -22,7 +22,7 @@ for path in properties["Devices"]:
if properties["Type"] not in ["wifi", "wimax",
"bluetooth", "cellular"]:
- continue;
+ continue
for path in properties["Networks"]:
network = dbus.Interface(bus.get_object("org.moblin.connman", path),
@@ -32,6 +32,9 @@ for path in properties["Devices"]:
dev = path[path.rfind("/") + 1:]
+ if "Name" not in properties.keys():
+ continue
+
if dev == sys.argv[1] or properties["Name"] == sys.argv[1]:
print "Disconnecting %s" % (path)
network.Disconnect()