From 552094eba3795ba2dd398dd30cfa69fae929753d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 26 Dec 2008 12:43:26 +0100 Subject: [PATCH] Convert scripts using type lists --- test/list-networks | 2 +- test/start-scanning | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/list-networks b/test/list-networks index b446210..d8958fb 100755 --- a/test/list-networks +++ b/test/list-networks @@ -25,7 +25,7 @@ for path in properties["Devices"]: properties = device.GetProperties() - if (properties["Type"] != "wifi" and properties["Type"] != "wimax"): + if properties["Type"] not in ["wifi", "wimax", "bluetooth"]: continue; print "[ %s ]" % (path) diff --git a/test/start-scanning b/test/start-scanning index aaa3e58..cf36477 100755 --- a/test/start-scanning +++ b/test/start-scanning @@ -17,11 +17,8 @@ for path in properties["Devices"]: print "[ %s ]" % (path) - if (properties["Type"] == "wifi"): - print " Started WiFi scanning" - device.ProposeScan() - elif (properties["Type"] == "wimax"): - print " Started WiMAX scanning" + if properties["Type"] in ["wifi", "wimax"]: + print " Started scanning" device.ProposeScan() else: print " No scanning" -- 2.7.4