From: Marcel Holtmann Date: Mon, 7 Dec 2009 08:28:54 +0000 (+0100) Subject: Skip accessing unexisting Interface property X-Git-Tag: 0.48~149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7be778b2a3afb7994770e0829263c29553431474;p=platform%2Fupstream%2Fconnman.git Skip accessing unexisting Interface property --- diff --git a/test/disable-device b/test/disable-device index 7aadab0..caa954f 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 b5b1a9c..6451441 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 f9ab201..c5da877 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