diff options
-rw-r--r-- | slixmpp/plugins/xep_0231/bob.py | 3 | ||||
-rw-r--r-- | slixmpp/plugins/xep_0231/stanza.py | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0231/bob.py b/slixmpp/plugins/xep_0231/bob.py index b26eeede..a3b5edd4 100644 --- a/slixmpp/plugins/xep_0231/bob.py +++ b/slixmpp/plugins/xep_0231/bob.py @@ -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: diff --git a/slixmpp/plugins/xep_0231/stanza.py b/slixmpp/plugins/xep_0231/stanza.py index f7e6a66c..b3b96eff 100644 --- a/slixmpp/plugins/xep_0231/stanza.py +++ b/slixmpp/plugins/xep_0231/stanza.py @@ -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)) |