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 5ed672aaf7cd6ded25585da5ba825cf860dca866..afeb110f136bc6f315d275338d257e3b3306c52b 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)