Commit e57118fd authored by Philipp Hörist's avatar Philipp Hörist

Cast exceptions to str

parent 33ca0042
......@@ -221,7 +221,7 @@ class OMEMO:
return self._parse_devicelist(item)
except StanzaMalformed as error:
return raise_error(log.warning, stanza,
'stanza-malformed', error)
'stanza-malformed', str(error))
def set_bundle(self, bundle, device_id):
item = self._create_bundle(bundle)
......@@ -301,7 +301,7 @@ class OMEMO:
return self._parse_bundle(item)
except StanzaMalformed as error:
return raise_error(log.warning, stanza,
'stanza-malformed', error)
'stanza-malformed', str(error))
@staticmethod
def _parse_bundle(item):
......
......@@ -112,7 +112,8 @@ class UserAvatar:
try:
data = base64.b64decode(data.encode('utf-8'))
except Exception as error:
return raise_error(log.warning, stanza, 'stanza-malformed', error)
return raise_error(log.warning, stanza,
'stanza-malformed', str(error))
log.info('Received avatar data: %s %s', jid, sha)
return AvatarData(jid, sha, data)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment