prevent traceback when server doen't include a query in jabber:iq:roster reply. Fixes #4579
This commit is contained in:
parent
5c8cd8839a
commit
24bb239fdb
|
@ -68,7 +68,9 @@ class Roster(PlugIn):
|
||||||
if not sender is None and not sender.bareMatch(
|
if not sender is None and not sender.bareMatch(
|
||||||
self._owner.User + '@' + self._owner.Server):
|
self._owner.User + '@' + self._owner.Server):
|
||||||
return
|
return
|
||||||
for item in stanza.getTag('query').getTags('item'):
|
query = stanza.getTag('query')
|
||||||
|
if query:
|
||||||
|
for item in query.getTags('item'):
|
||||||
jid=item.getAttr('jid')
|
jid=item.getAttr('jid')
|
||||||
if item.getAttr('subscription')=='remove':
|
if item.getAttr('subscription')=='remove':
|
||||||
if jid in self._data: del self._data[jid]
|
if jid in self._data: del self._data[jid]
|
||||||
|
|
Loading…
Reference in New Issue