summaryrefslogtreecommitdiffstats
path: root/python/examples/list-system-services.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/examples/list-system-services.py')
-rw-r--r--python/examples/list-system-services.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/python/examples/list-system-services.py b/python/examples/list-system-services.py
index 9769fc5a..9b114da9 100644
--- a/python/examples/list-system-services.py
+++ b/python/examples/list-system-services.py
@@ -17,8 +17,5 @@ dbus_object = dbus_service.get_object('/org/freedesktop/DBus',
# One of the member functions in the org.freedesktop.DBus interface
# is ListServices(), which provides a list of all the other services
# registered on this bus. Call it, and print the list.
-system_service_list = dbus_object.ListServices()
-
-for service in system_service_list:
- if service[0] != ':':
- print (service)
+system_service_list = dbus_object.ListNames()
+print str(system_service_list)