gdbus-testserver: port to pygi
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>
Sat, 6 Oct 2012 12:56:36 +0000 (14:56 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 15 Oct 2012 23:37:04 +0000 (19:37 -0400)
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
https://bugzilla.gnome.org/show_bug.cgi?id=685608

gio/tests/gdbus-testserver.py

index 645a7e4..8d29fe5 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import gobject
+from gi.repository import GLib
 import time
 
 import dbus
@@ -236,7 +236,7 @@ class TestService(dbus.service.Object):
         def return_from_async_wait():
             return_cb()
             return False
-        gobject.timeout_add(msec, return_from_async_wait)
+        GLib.timeout_add(msec, return_from_async_wait)
 
     # ----------------------------------------------------------------------------------------------------
 
@@ -295,5 +295,5 @@ if __name__ == '__main__':
     obj.frob_props["foo"] = "a frobbed string"
     obj.frob_props["PropertyThatWillBeInvalidated"] = "InitialValue"
 
-    mainloop = gobject.MainLoop()
+    mainloop = GLib.MainLoop()
     mainloop.run()