summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2006-12-13 14:48:56 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2006-12-13 14:48:56 +0000
commit717c5b4b3852c5e519bc4a1ccb9df8414d4c019c (patch)
treed9c3aba3177f1acc1e53abd25f06eaa1bc13d167 /examples
parentb70364f2a37e64585c53a72e36481407e375808c (diff)
list-system-services.py: Use the NULL_MAIN_LOOP
Diffstat (limited to 'examples')
-rw-r--r--examples/list-system-services.py4
1 files changed, 3 insertions, 1 deletions
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.