Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/chat
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2006-04-21 20:24:46 (GMT)
committer Dan Williams <dcbw@redhat.com>2006-04-21 20:24:46 (GMT)
commitf1efb436b08aa00c40fa8ab8918d2de9cbc12a4a (patch)
tree6d09b7bc3285cca5ec3108d96024ebed23ea0657 /chat
parent33545aa0346a7216257e3af870da888926730d59 (diff)
Fix up message sending
Diffstat (limited to 'chat')
-rw-r--r--chat/BuddyList.py3
-rwxr-xr-xchat/chat.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/chat/BuddyList.py b/chat/BuddyList.py
index 7bf2e4e..edd5f79 100644
--- a/chat/BuddyList.py
+++ b/chat/BuddyList.py
@@ -78,7 +78,8 @@ class BuddyList(object):
return None
def find_buddy_by_address(self, address):
- for buddy in self._buddies.keys():
+ for buddy_name in self._buddies.keys():
+ buddy = self._buddies[buddy_name]
if buddy.address() == address:
return buddy
return None
diff --git a/chat/chat.py b/chat/chat.py
index b014ee2..da3fda6 100755
--- a/chat/chat.py
+++ b/chat/chat.py
@@ -173,7 +173,9 @@ class ChatActivity(activity.Activity):
def _get_current_chat(self):
selection = self._buddy_list_view.get_selection()
(model, aniter) = selection.get_selected()
- buddy = model.get_value(aniter, 1)
+ buddy = None
+ if aniter:
+ buddy = model.get_value(aniter, 1)
if not buddy:
return self._group_chat
return buddy.chat()