From dd41a85efcd85bb3a4eb81187041106c65c6aa2d Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 14 Jun 2011 14:03:54 -0700 Subject: 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']. --- sleekxmpp/basexmpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.3