Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Collett <morgan.collett@gmail.com>2007-10-15 15:48:16 (GMT)
committer Morgan Collett <morgan.collett@gmail.com>2007-10-15 15:48:16 (GMT)
commit2ff4b1e54d54d0bed7ecdcc79a3abf9d160d691a (patch)
treeb8603cf6acc6aa8a07b5e37cd2204dc7c2479cfc
parent1f1d6e280816abd85387722b3ba3fd9742921aac (diff)
Revert "Maintain local handle to buddy cache"
This reverts commit 64340f33cf322ebcfdbf6349c14b2bd296a6c9d0.
-rw-r--r--activity.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/activity.py b/activity.py
index 65379d3..f2156b5 100644
--- a/activity.py
+++ b/activity.py
@@ -195,7 +195,6 @@ class HelloTube(ExportedGObject):
self.entered = False # Have we set up the tube?
self.helloworld = False # Trivial "game state"
self._get_buddy = get_buddy # Converts handle to Buddy object
- self._handle_to_buddy = {} # Cache buddy handles
self.tube.watch_participants(self.participant_change_cb)
def participant_change_cb(self, added, removed):
@@ -206,10 +205,9 @@ class HelloTube(ExportedGObject):
for handle, bus_name in added:
buddy = self._get_buddy(handle)
if buddy is not None:
- self._logger.debug('Buddy %s was added', buddy.props.nick)
- self._handle_to_buddy[handle] = buddy
+ self._logger.debug('Buddy %s was added' % buddy.props.nick)
for handle in removed:
- buddy = self._handle_to_buddy.pop(handle, None)
+ buddy = self._get_buddy(handle)
if buddy is not None:
self._logger.debug('Buddy %s was removed', buddy.props.nick)
if not self.entered: