summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-07 09:28:54 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-12-07 09:28:54 +0100
commit7be778b2a3afb7994770e0829263c29553431474 (patch)
tree1bf0572326be70dcacfe83de10ec080f838b1468 /test
parentcca49d38b4ec29a42821697a8c6b4c3e953c11f3 (diff)
downloadconnman-7be778b2a3afb7994770e0829263c29553431474.tar.gz
connman-7be778b2a3afb7994770e0829263c29553431474.tar.bz2
connman-7be778b2a3afb7994770e0829263c29553431474.zip
Skip accessing unexisting Interface property
Diffstat (limited to 'test')
-rwxr-xr-xtest/disable-device5
-rwxr-xr-xtest/enable-device5
-rwxr-xr-xtest/test-connman3
3 files changed, 11 insertions, 2 deletions
diff --git a/test/disable-device b/test/disable-device
index 7aadab01..caa954f0 100755
--- a/test/disable-device
+++ b/test/disable-device
@@ -20,8 +20,11 @@ for path in properties["Devices"]:
properties = device.GetProperties()
+ if "Interface" not in properties.keys():
+ continue
+
if properties["Interface"] != sys.argv[1]:
- continue;
+ continue
print "Disabling device %s" % (path)
diff --git a/test/enable-device b/test/enable-device
index b5b1a9cc..64514416 100755
--- a/test/enable-device
+++ b/test/enable-device
@@ -20,8 +20,11 @@ for path in properties["Devices"]:
properties = device.GetProperties()
+ if "Interface" not in properties.keys():
+ continue
+
if properties["Interface"] != sys.argv[1]:
- continue;
+ continue
print "Enabling device %s" % (path)
diff --git a/test/test-connman b/test/test-connman
index f9ab2017..c5da877c 100755
--- a/test/test-connman
+++ b/test/test-connman
@@ -354,6 +354,9 @@ elif sys.argv[1] == "dev":
properties = device.GetProperties()
+ if "Interface" not in properties.keys():
+ continue
+
if interface != "" and properties["Interface"] != interface:
continue