summaryrefslogtreecommitdiff
path: root/dbus/service.py
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-01-10 13:05:23 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2007-01-10 13:05:23 +0000
commitbde53f1cf59b743d5e38b6ac4fbdf348bdf773db (patch)
tree44b2ca36270e876b5e715b5344d9997df4d248cd /dbus/service.py
parent92e8cc8ff3cb87af3e94bc455d3be057e98846d3 (diff)
Add special case to serialization: objects with a __dbus_object_path__ attribute are serialized as that object path. Add that attribute to ProxyObject, dbus.Interface and dbus.service.Object.
Diffstat (limited to 'dbus/service.py')
-rw-r--r--dbus/service.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/dbus/service.py b/dbus/service.py
index 1701d11..1cb63f3 100644
--- a/dbus/service.py
+++ b/dbus/service.py
@@ -417,6 +417,9 @@ class Object(Interface):
self._connection._register_object_path(object_path, self._message_cb, self._unregister_cb)
+ __dbus_object_path__ = property(lambda self: self._object_path, None, None,
+ "The D-Bus object path of this object")
+
def _unregister_cb(self, connection):
_logger.info('Unregistering exported object %r', self)