xep_0231: Fix a traceback on result serialization.
This commit is contained in:
parent
3978078710
commit
27f98bf22c
@ -134,8 +134,7 @@ class XEP_0231(BasePlugin):
|
||||
def _get_bob(self, jid, node, ifrom, cid):
|
||||
if cid in self._cids:
|
||||
return self._cids[cid]
|
||||
else:
|
||||
raise XMPPError('item-not-found')
|
||||
raise XMPPError('item-not-found')
|
||||
|
||||
def _del_bob(self, jid, node, ifrom, cid):
|
||||
if cid in self._cids:
|
||||
|
@ -21,10 +21,10 @@ class BitsOfBinary(ElementBase):
|
||||
interfaces = set(('cid', 'max_age', 'type', 'data'))
|
||||
|
||||
def get_max_age(self):
|
||||
return self._get_attr('max-age')
|
||||
return int(self._get_attr('max-age'))
|
||||
|
||||
def set_max_age(self, value):
|
||||
self._set_attr('max-age', value)
|
||||
self._set_attr('max-age', str(value))
|
||||
|
||||
def get_data(self):
|
||||
return base64.b64decode(bytes(self.xml.text))
|
||||
|
Loading…
Reference in New Issue
Block a user