Fixed 'nil' bug in unmarshalling.
This commit is contained in:
parent
a21178007f
commit
4be6482ff3
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user