From 7be778b2a3afb7994770e0829263c29553431474 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 7 Dec 2009 09:28:54 +0100 Subject: [PATCH] Skip accessing unexisting Interface property --- test/disable-device | 5 ++++- test/enable-device | 5 ++++- test/test-connman | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) 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 -- 2.7.4