diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-01-10 13:05:23 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-01-10 13:05:23 +0000 |
commit | bde53f1cf59b743d5e38b6ac4fbdf348bdf773db (patch) | |
tree | 44b2ca36270e876b5e715b5344d9997df4d248cd /dbus/service.py | |
parent | 92e8cc8ff3cb87af3e94bc455d3be057e98846d3 (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.py | 3 |
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) |