test: add Settings dict parsing for CDMA ConnMan
authorChristian Lam <christian.lam@nokia.com>
Fri, 21 Jan 2011 23:06:50 +0000 (15:06 -0800)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 17 Mar 2011 19:23:26 +0000 (14:23 -0500)
test/list-modems

index 249ae15..662a3c7 100755 (executable)
@@ -62,6 +62,16 @@ for path, properties in modems:
                                for i in properties[key]:
                                        val +=  "[" + i + " = "
                                        val += str(int(properties[key][i])) + "] "
+                       elif key in ["Settings"]:
+                               val = "{"
+                               for i in properties[key].keys():
+                                       val += " " + i + "="
+                                       if i in ["DomainNameServers"]:
+                                               for n in properties[key][i]:
+                                                       val += n + ","
+                                       else:
+                                               val += properties[key][i]
+                               val += " }"
                        else:
                                val = str(properties[key])
                        print "        %s = %s" % (key, val)