Fixed 'nil' bug in unmarshalling.

This commit is contained in:
Dann Martens 2011-01-13 13:42:01 +01:00
parent a21178007f
commit 4be6482ff3

View file

@ -100,6 +100,8 @@ def xml2py(params):
def _xml2py(value): def _xml2py(value):
namespace = 'jabber:iq:rpc' namespace = 'jabber:iq:rpc'
if value.find('{%s}nil' % namespace) is not None:
return None
if value.find('{%s}i4' % namespace) is not None: if value.find('{%s}i4' % namespace) is not None:
return int(value.find('{%s}i4' % namespace).text) return int(value.find('{%s}i4' % namespace).text)
if value.find('{%s}int' % namespace) is not None: if value.find('{%s}int' % namespace) is not None: