diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-01-01 20:24:58 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-01-01 20:24:58 +0300 |
commit | da5f7ab1da8e8c139fdcc0bad250fa8ccd79ae07 (patch) | |
tree | d189e725351ae2ad58201c21e8d64f6d73bdc06b /nbxmpp/structs.py | |
parent | ecc356ecb895a782767107fe5b45e0d517444cf9 (diff) |
Dont fail on unknown errors
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r-- | nbxmpp/structs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index bc17b97..c487539 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -224,7 +224,10 @@ class ErrorProperties: def __init__(self, stanza): for child in stanza.getTag('error').getChildren(): if child.getNamespace() == NS_STANZAS: - self.type = Error(child.name) + try: + self.type = Error(child.name) + except ValueError: + self.type = Error('unknown-error') break self.legacy_code = stanza.getErrorCode() self.legacy_type = stanza.getErrorType() |