This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 test/test-manager |   39 ++++++++++++++++++++++++++++++++-------
 1 files changed, 32 insertions(+), 7 deletions(-)

New commits:
commit 800c08ed4d45aa21f6540b49e34a8a36d44f2542
Author: Marcel Holtmann <[email protected]>
Date:   Mon Dec 15 01:30:13 2008 +0100

    Print networks more prettier and easier to read

commit b7ccda2018ca17b559d079503c49b330ea9d12f2
Author: Marcel Holtmann <[email protected]>
Date:   Mon Dec 15 01:18:09 2008 +0100

    Print more manager details


Diff in this email is a maximum of 400 lines.
diff --git a/test/test-manager b/test/test-manager
index 0ae6a40..afeb110 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -9,14 +9,39 @@ manager = dbus.Interface(bus.get_object("org.moblin.connman", 
"/"),
 
 properties = manager.GetProperties()
 
-def print_list(key, value):
-       text = ""
+def print_properties(key, value):
+       if (key == "Profiles"):
+               interface = "org.moblin.connman.Profile"
+       elif (key == "Devices"):
+               interface = "org.moblin.connman.Device"
+       elif (key == "Connections"):
+               interface = "org.moblin.connman.Connection"
+       else:
+               return
+
+       print "%s" % (key)
        for path in value:
-               text = text + str(path) + " "
-       print "%s = %s" % (key, text)
+               print "    %s" % (path)
+               obj = dbus.Interface(bus.get_object("org.moblin.connman", path),
+                                                               interface)
+
+               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"]):
-               print_list(key, properties[key])
+       if key in ["Profiles", "Devices", "Connections"]:
+               print_properties(key, properties[key])
        else:
-               print "%s = %s" % (key, properties[key])
+               print "%s" % (key)
+               print "    %s" % (properties[key])
_______________________________________________
Commits mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/commits

Reply via email to