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'].
This commit is contained in:
Lance Stout 2011-06-14 14:03:54 -07:00
parent e2d18170b0
commit dd41a85efc

View file

@ -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: