From 4be6482ff3278612365863575dceeda9fd9a88c3 Mon Sep 17 00:00:00 2001 From: Dann Martens Date: Thu, 13 Jan 2011 13:42:01 +0100 Subject: [PATCH] Fixed 'nil' bug in unmarshalling. --- sleekxmpp/plugins/xep_0009/binding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sleekxmpp/plugins/xep_0009/binding.py b/sleekxmpp/plugins/xep_0009/binding.py index 464081f..61ef146 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: