DA: Add exception check for time logic
[platform/upstream/connman.git] / test / list-services
index a2610d7..4accf77 100755 (executable)
@@ -4,7 +4,7 @@ import dbus
 
 def extract_values(values):
        val = "{"
-       for key in values.keys():
+       for key in list(values.keys()):
                val += " " + key + "="
                if key in ["PrefixLength"]:
                        val += "%s" % (int(values[key]))
@@ -34,9 +34,9 @@ for path, properties in manager.GetServices():
        service = dbus.Interface(bus.get_object("net.connman", path),
                                                "net.connman.Service")
        identifier = path[path.rfind("/") + 1:]
-       print "[ %s ]" % (identifier)
+       print("[ %s ]" % (identifier))
 
-       for key in properties.keys():
+       for key in list(properties.keys()):
                if key in ["IPv4", "IPv4.Configuration",
                                "IPv6", "IPv6.Configuration",
                                        "Proxy", "Proxy.Configuration",
@@ -58,6 +58,6 @@ for path, properties in manager.GetServices():
                        val = int(properties[key])
                else:
                        val = properties[key]
-               print "    %s = %s" % (key, val)
+               print("    %s = %s" % (key, val))
 
-       print
+       print()