Print networks more prettier and easier to read
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Dec 2008 00:30:13 +0000 (01:30 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 15 Dec 2008 00:30:13 +0000 (01:30 +0100)
test/test-manager

index 5ed672a..afeb110 100755 (executable)
@@ -28,10 +28,19 @@ def print_properties(key, value):
                properties = obj.GetProperties()
 
                for key in properties.keys():
+                       if (key == "Networks"):
+                               continue
                        print "        %s = %s" % (key, properties[key])
 
+               if "Networks" in properties.keys():
+                       list = ""
+                       for path in properties["Networks"]:
+                               val = str(path)
+                               list = list + val[val.rfind("/") + 1:] + " "
+                       print "        Networks = [ %s]" % (list)
+
 for key in properties.keys():
-       if (key in ["Profiles", "Devices", "Connections"]):
+       if key in ["Profiles", "Devices", "Connections"]:
                print_properties(key, properties[key])
        else:
                print "%s" % (key)