[Telepathy-commits] [telepathy-pinocchio/master] don't overwrite the dbus Connection in ContactList channels
Travis Reitter
travis.reitter at collabora.co.uk
Tue Aug 19 15:07:17 PDT 2008
---
pinocchio/channel/contact_list.py | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/pinocchio/channel/contact_list.py b/pinocchio/channel/contact_list.py
index ae81571..6a049ee 100644
--- a/pinocchio/channel/contact_list.py
+++ b/pinocchio/channel/contact_list.py
@@ -35,7 +35,7 @@ class ContactList(tp.server.ChannelTypeContactList,
channel_handle_obj)
tp.server.ChannelInterfaceGroup.__init__(self)
- self._connection = connection
+ self.connection = connection
self.account_id = account_id
contacts_disk = pin.server.StoredContactList(connection,
channel_handle_obj)
@@ -71,19 +71,19 @@ class ContactList(tp.server.ChannelTypeContactList,
handle_type = tp.constants.HANDLE_TYPE_CONTACT
for handle_id in contacts:
- if (handle_type, handle_id) not in self._connection._handles:
+ if (handle_type, handle_id) not in self.connection._handles:
raise tp.errors.InvalidHandle('unknown contact handle %d' % \
handle_id)
- conn_handles = self._connection._handles
+ conn_handles = self.connection._handles
handle_objs = set([conn_handles[tp.constants.HANDLE_TYPE_CONTACT, x]
for x in contacts])
self.MembersChanged(message, handle_objs, (), (), (),
- self._connection._self_handle,
+ self.connection._self_handle,
tp.constants.CHANNEL_GROUP_CHANGE_REASON_NONE)
- self._connection.save()
+ self.connection.save()
def RemoveMembers(self, contacts, message):
"""Remove list of contacts from this group.
@@ -111,18 +111,18 @@ class ContactList(tp.server.ChannelTypeContactList,
handle_type = tp.constants.HANDLE_TYPE_CONTACT
for handle_id in contacts:
- if (handle_type, handle_id) not in self._connection._handles:
+ if (handle_type, handle_id) not in self.connection._handles:
raise tp.errors.InvalidHandle('unknown contact handle %d' % \
handle_id)
- conn_handles = self._connection._handles
+ conn_handles = self.connection._handles
handle_objs = set([conn_handles[tp.constants.HANDLE_TYPE_CONTACT, x]
for x in contacts])
self.MembersChanged(message, (), handle_objs, (), (),
- self._connection._self_handle, reason)
+ self.connection._self_handle, reason)
- self._connection.save()
+ self.connection.save()
class Group(tp.server.ChannelTypeContactList, tp.server.ChannelInterfaceGroup):
"""
@@ -136,7 +136,7 @@ class Group(tp.server.ChannelTypeContactList, tp.server.ChannelInterfaceGroup):
channel_handle_obj)
tp.server.ChannelInterfaceGroup.__init__(self)
- self._connection = connection
+ self.connection = connection
self.account_id = account_id
contacts_disk = pin.server.StoredGroup(connection, channel_handle_obj)
@@ -173,19 +173,19 @@ class Group(tp.server.ChannelTypeContactList, tp.server.ChannelInterfaceGroup):
handle_type = tp.constants.HANDLE_TYPE_CONTACT
for handle_id in contacts:
- if (handle_type, handle_id) not in self._connection._handles:
+ if (handle_type, handle_id) not in self.connection._handles:
raise tp.errors.InvalidHandle('unknown contact handle %d' % \
handle_id)
- conn_handles = self._connection._handles
+ conn_handles = self.connection._handles
handle_objs = set([conn_handles[tp.constants.HANDLE_TYPE_CONTACT, x]
for x in contacts])
self.MembersChanged(message, handle_objs, (), (), (),
- self._connection._self_handle,
+ self.connection._self_handle,
tp.constants.CHANNEL_GROUP_CHANGE_REASON_NONE)
- self._connection.save()
+ self.connection.save()
def RemoveMembers(self, contacts, message):
"""Remove list of contacts from this group.
@@ -213,15 +213,15 @@ class Group(tp.server.ChannelTypeContactList, tp.server.ChannelInterfaceGroup):
handle_type = tp.constants.HANDLE_TYPE_CONTACT
for handle_id in contacts:
- if (handle_type, handle_id) not in self._connection._handles:
+ if (handle_type, handle_id) not in self.connection._handles:
raise tp.errors.InvalidHandle('unknown contact handle %d' % \
handle_id)
- conn_handles = self._connection._handles
+ conn_handles = self.connection._handles
handle_objs = set([conn_handles[tp.constants.HANDLE_TYPE_CONTACT, x]
for x in contacts])
self.MembersChanged(message, (), handle_objs, (), (),
- self._connection._self_handle, reason)
+ self.connection._self_handle, reason)
- self._connection.save()
+ self.connection.save()
--
1.5.6.3
More information about the Telepathy-commits
mailing list