From 717c5b4b3852c5e519bc4a1ccb9df8414d4c019c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 13 Dec 2006 14:48:56 +0000 Subject: list-system-services.py: Use the NULL_MAIN_LOOP --- examples/list-system-services.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/list-system-services.py b/examples/list-system-services.py index da4111b..28dae35 100644 --- a/examples/list-system-services.py +++ b/examples/list-system-services.py @@ -6,6 +6,7 @@ List services on the system bus (default) or the session bus.""" import sys import dbus +from dbus.mainloop import NULL_MAIN_LOOP def main(argv): factory = dbus.SystemBus @@ -19,7 +20,8 @@ def main(argv): sys.exit(__doc__) # Get a connection to the system or session bus as appropriate - bus = factory() + # We're only using blocking calls, so don't actually need a main loop here + bus = factory(mainloop=NULL_MAIN_LOOP) # Get a reference to the desktop bus' standard object, denoted # by the path /org/freedesktop/DBus. -- cgit v1.2.3