diff options
author | John Smith <mrdoctorwho@gmail.com> | 2016-07-05 11:35:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-05 11:35:35 +0300 |
commit | 0c74c5e42860b5544235bd4d608dbbb93e097ad3 (patch) | |
tree | 5e0cbda7d71145dc7ab1b4ce0f64cb1c0d167d9e | |
parent | f04b93b5ac4554488ab4fe2963c845e76029cbd8 (diff) |
Update roster.py: Fix wrong roster stanza parsing
-rw-r--r-- | xmpp/roster.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xmpp/roster.py b/xmpp/roster.py index 5a36059..b91000e 100644 --- a/xmpp/roster.py +++ b/xmpp/roster.py @@ -80,6 +80,8 @@ class Roster(PlugIn): Subscription tracker. Used internally for setting items state in
internal roster representation.
"""
+ if not stanza or not stanza.getTag("query"):
+ raise NodeProcessed()
for item in stanza.getTag("query").getTags("item"):
jid = item.getAttr("jid")
if item.getAttr("subscription") == "remove":
|