summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDann Martens <me@dannmartens.com>2011-01-13 13:42:01 +0100
committerDann Martens <me@dannmartens.com>2011-01-13 13:42:01 +0100
commit4be6482ff3278612365863575dceeda9fd9a88c3 (patch)
tree618b52ca3473a54081f8a4fec9b42da3e41fc855
parenta21178007faa4e2975ae07ef48762a74eb84eda5 (diff)
downloadslixmpp-4be6482ff3278612365863575dceeda9fd9a88c3.tar.gz
slixmpp-4be6482ff3278612365863575dceeda9fd9a88c3.tar.bz2
slixmpp-4be6482ff3278612365863575dceeda9fd9a88c3.tar.xz
slixmpp-4be6482ff3278612365863575dceeda9fd9a88c3.zip
Fixed 'nil' bug in unmarshalling.
-rw-r--r--sleekxmpp/plugins/xep_0009/binding.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0009/binding.py b/sleekxmpp/plugins/xep_0009/binding.py
index 464081fc..61ef1469 100644
--- a/sleekxmpp/plugins/xep_0009/binding.py
+++ b/sleekxmpp/plugins/xep_0009/binding.py
@@ -100,6 +100,8 @@ def xml2py(params):
def _xml2py(value):
namespace = 'jabber:iq:rpc'
+ if value.find('{%s}nil' % namespace) is not None:
+ return None
if value.find('{%s}i4' % namespace) is not None:
return int(value.find('{%s}i4' % namespace).text)
if value.find('{%s}int' % namespace) is not None: