X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=test%2Flist-networks;h=e8fb00a584f7263645c42592b380e8f7a07fae32;hb=a9c1d0a135e77025b9810eeb5653283b0b5278c3;hp=b4462103a532e3d9d53285269c12b05f32fae8b9;hpb=c634b10c2613e71f2824171b9a42c1728f801c71;p=connman diff --git a/test/list-networks b/test/list-networks index b446210..e8fb00a 100755 --- a/test/list-networks +++ b/test/list-networks @@ -25,8 +25,12 @@ for path in properties["Devices"]: properties = device.GetProperties() - if (properties["Type"] != "wifi" and properties["Type"] != "wimax"): - continue; + try: + if properties["Type"] not in ["wifi", "wimax", + "bluetooth", "cellular"]: + continue + except: + continue print "[ %s ]" % (path) @@ -39,10 +43,10 @@ for path in properties["Devices"]: print " [ %s ]" % (path) for key in properties.keys(): - if (key == "WiFi.SSID"): + if key == "WiFi.SSID": ssid = convert_ssid(properties[key]) print " %s = [ %s ]" % (key, ssid) - elif (key == "Strength"): + elif key in ["Strength", "Priority"]: print " %s = %d" % (key, properties[key]) else: print " %s = %s" % (key, properties[key])