[Telepathy-commits] [telepathy-python/master] Make sure DBusProperties.__init__ is called after self._interfaces is set.
Jonny Lamb
jonny.lamb at collabora.co.uk
Tue Dec 23 18:12:14 PST 2008
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
src/server/channel.py | 10 +++++-----
src/server/conn.py | 5 +++--
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/server/channel.py b/src/server/channel.py
index 5f87793..77c4f56 100644
--- a/src/server/channel.py
+++ b/src/server/channel.py
@@ -55,18 +55,18 @@ class Channel(_Channel, DBusProperties):
self._conn = connection
object_path = self._conn.get_channel_path()
_Channel.__init__(self, self._conn._name, object_path)
- DBusProperties.__init__(self)
+ self._type = type
+ self._handle = handle
+ self._interfaces = set()
+
+ DBusProperties.__init__(self)
self._implement_property_get(CHANNEL_INTERFACE,
{'ChannelType': lambda: dbus.String(self.GetChannelType()),
'Interfaces': lambda: dbus.Array(self.GetInterfaces()),
'TargetHandle': lambda: dbus.UInt32(self.GetHandle()),
'TargetHandleType': lambda: dbus.UInt32(self._handle.get_type())})
- self._type = type
- self._handle = handle
- self._interfaces = set()
-
@dbus.service.method(CHANNEL_INTERFACE, in_signature='', out_signature='')
def Close(self):
self.Closed()
diff --git a/src/server/conn.py b/src/server/conn.py
index 5203aa2..77b3277 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -76,7 +76,6 @@ class Connection(_Connection, DBusProperties):
object_path = '/org/freedesktop/Telepathy/Connection/%s/%s/%s' % \
(manager, proto, clean_account)
_Connection.__init__(self, bus_name, object_path)
- DBusProperties.__init__(self)
# monitor clients dying so we can release handles
dbus.SessionBus().add_signal_receiver(self.name_owner_changed_callback,
@@ -85,13 +84,15 @@ class Connection(_Connection, DBusProperties):
'org.freedesktop.DBus',
'/org/freedesktop/DBus')
+ self._interfaces = set()
+
+ DBusProperties.__init__(self)
self._implement_property_get(CONN_INTERFACE,
{'SelfHandle': lambda: dbus.UInt32(self.GetSelfHandle())})
self._proto = proto
self._status = CONNECTION_STATUS_DISCONNECTED
- self._interfaces = set()
self._handles = weakref.WeakValueDictionary()
self._next_handle_id = 1
--
1.5.6.5
More information about the Telepathy-commits
mailing list