diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 09:28:54 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 09:28:54 +0100 |
commit | 7be778b2a3afb7994770e0829263c29553431474 (patch) | |
tree | 1bf0572326be70dcacfe83de10ec080f838b1468 /test | |
parent | cca49d38b4ec29a42821697a8c6b4c3e953c11f3 (diff) | |
download | connman-7be778b2a3afb7994770e0829263c29553431474.tar.gz connman-7be778b2a3afb7994770e0829263c29553431474.tar.bz2 connman-7be778b2a3afb7994770e0829263c29553431474.zip |
Skip accessing unexisting Interface property
Diffstat (limited to 'test')
-rwxr-xr-x | test/disable-device | 5 | ||||
-rwxr-xr-x | test/enable-device | 5 | ||||
-rwxr-xr-x | test/test-connman | 3 |
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 |