DA: Skip initializing failed_bssids list when eapol failure case
[platform/upstream/connman.git] / test / monitor-connman
index 1b3b84c..c6edd76 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-import gobject
+from gi.repository import GLib
 
 import dbus
 import dbus.mainloop.glib
@@ -19,7 +19,7 @@ def extract_list(list):
 
 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]))
@@ -54,7 +54,7 @@ def property_changed(name, value, path, interface):
        iface = interface[interface.rfind(".") + 1:]
        val = extract(name, value)
 
-       print "{%s} [%s] %s = %s" % (iface, path, name, val)
+       print("{%s} [%s] %s = %s" % (iface, path, name, val))
 
 def message_filter(connection, message):
        if not isinstance(message, MethodCallMessage):
@@ -82,6 +82,6 @@ if __name__ == '__main__':
        bus.add_match_string("member=Update,interface=net.connman.Notification")
        bus.add_message_filter(message_filter)
 
-       mainloop = gobject.MainLoop()
+       mainloop = GLib.MainLoop()
 
        mainloop.run()