Handle service list correctly
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 1 Apr 2009 03:12:27 +0000 (20:12 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 1 Apr 2009 03:12:27 +0000 (20:12 -0700)
test/list-profiles

index 4774114..9a68d20 100755 (executable)
@@ -17,6 +17,13 @@ for path in properties["Profiles"]:
 
        properties = profile.GetProperties()
        for key in properties.keys():
-               print "    %s = %s" % (key, properties[key])
+               if key in ["Services"]:
+                       list = ""
+                       for path in properties["Services"]:
+                               val = str(path)
+                               list = list + val[val.rfind("/") + 1:] + " "
+                       print "    Services = [ %s]" % (list)
+               else:
+                       print "    %s = %s" % (key, properties[key])
 
        print