diff options
author | Simon McVittie <smcv@debian.org> | 2016-01-20 12:39:07 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-01-20 12:39:07 +0000 |
commit | d7677ab1bcabe60e84215eb17b51b644737bfcb0 (patch) | |
tree | 6f5d1c2fde097fa98c26c8e007390ec163691721 /examples/example-signal-recipient.py | |
parent | ea0e8705750e8b4448e5e51c86d07132cf1ac1c8 (diff) | |
download | dbus-python-d7677ab1bcabe60e84215eb17b51b644737bfcb0.tar.gz |
Use gi instead of gobject, everywhere except dbus.gobject_service
Diffstat (limited to 'examples/example-signal-recipient.py')
-rwxr-xr-x | examples/example-signal-recipient.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/example-signal-recipient.py b/examples/example-signal-recipient.py index 4810f5e..818b0fa 100755 --- a/examples/example-signal-recipient.py +++ b/examples/example-signal-recipient.py @@ -32,7 +32,7 @@ python example-signal-recipient.py --exit-service import sys import traceback -import gobject +from gi.repository import GLib import dbus import dbus.mainloop.glib @@ -48,7 +48,7 @@ def emit_signal(): object.emitHelloSignal(dbus_interface="com.example.TestService") #reply_handler = handle_reply, error_handler = handle_error) # exit after waiting a short time for the signal - gobject.timeout_add(2000, loop.quit) + GLib.timeout_add(2000, loop.quit) if sys.argv[1:] == ['--exit-service']: object.Exit(dbus_interface='com.example.TestService') @@ -93,7 +93,7 @@ if __name__ == '__main__': bus.add_signal_receiver(catchall_testservice_interface_handler, dbus_interface = "com.example.TestService", message_keyword='dbus_message') # Tell the remote object to emit the signal after a short delay - gobject.timeout_add(2000, emit_signal) + GLib.timeout_add(2000, emit_signal) - loop = gobject.MainLoop() + loop = GLib.MainLoop() loop.run() |