summaryrefslogtreecommitdiffstats
path: root/python/service.py
diff options
context:
space:
mode:
authorRobert McQueen <robot101@debian.org>2005-11-03 16:13:53 +0000
committerRobert McQueen <robot101@debian.org>2005-11-03 16:13:53 +0000
commit9d0ab378067cd59e12a1ba2671c353e4a8bce356 (patch)
treea4d0c8a99135ed21f13053862d83d88e9cdd4407 /python/service.py
parenta4b1aa364258be053d195650de9062b090f125c6 (diff)
2005-11-03 Robert McQueen <robot101@debian.org>
* python/_dbus.py, python/proxies.py, python/service.py: Add __repr__ functions to dbus.Bus, dbus.service.BusName and dbus.service.Object, tweak others to be consistent. * test/python/test-client.py: Tweak output of testInheritance.
Diffstat (limited to 'python/service.py')
-rw-r--r--python/service.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/service.py b/python/service.py
index 3809ca59..de68b614 100644
--- a/python/service.py
+++ b/python/service.py
@@ -28,6 +28,10 @@ class BusName:
"""Get the name of this service"""
return self._named_service
+ def __repr__(self):
+ return '<dbus.service.BusName %s on %r at %#x>' % (self._named_service, self._bus, id(self))
+ __str__ = __repr__
+
def _dispatch_dbus_method_call(self, argument_list, message):
"""Calls method_to_call using argument_list, but handles
exceptions, etc, and generates a reply to the DBus Message message
@@ -280,3 +284,6 @@ class Object(Interface):
return reflection_data
+ def __repr__(self):
+ return '<dbus.service.Object %s on %r at %#x>' % (self._object_path, self._name, id(self))
+ __str__ = __repr__