summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/basexmpp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index ab52dfbb..8e5c762a 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -643,7 +643,8 @@ class BaseXMPP(XMLStream):
log.debug("%s %s got offline" % (jid, resource))
del connections[resource]
- if not connections and not self.roster[jid]['in_roster']:
+ if not connections and \
+ not self.roster[jid].get('in_roster', False):
del self.roster[jid]
if not was_offline:
self.event("got_offline", presence)