summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-06-14 14:03:54 -0700
committerLance Stout <lancestout@gmail.com>2011-06-14 14:03:54 -0700
commitdd41a85efcd85bb3a4eb81187041106c65c6aa2d (patch)
tree3690cbfb97f225a8f7d7654c0d61117790a351c8
parente2d18170b00349e07b4e74fa16c73368c19863d4 (diff)
downloadslixmpp-dd41a85efcd85bb3a4eb81187041106c65c6aa2d.tar.gz
slixmpp-dd41a85efcd85bb3a4eb81187041106c65c6aa2d.tar.bz2
slixmpp-dd41a85efcd85bb3a4eb81187041106c65c6aa2d.tar.xz
slixmpp-dd41a85efcd85bb3a4eb81187041106c65c6aa2d.zip
Fix issue with components and roster.
If the roster contained a JID, but not any resource presence data, then an error would occur when accessing self.roster[jid]['presence'].
-rw-r--r--sleekxmpp/basexmpp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 8347bfe0..3992a4f9 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -614,7 +614,7 @@ class BaseXMPP(XMLStream):
'in_roster': False}
# Alias to simplify some references.
- connections = self.roster[jid]['presence']
+ connections = self.roster[jid].get('presence', {})
# Determine if the user has just come online.
if not resource in connections: