Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-01-01 20:24:58 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-01-01 20:24:58 +0300
commitda5f7ab1da8e8c139fdcc0bad250fa8ccd79ae07 (patch)
treed189e725351ae2ad58201c21e8d64f6d73bdc06b /nbxmpp/structs.py
parentecc356ecb895a782767107fe5b45e0d517444cf9 (diff)
Dont fail on unknown errors
Diffstat (limited to 'nbxmpp/structs.py')
-rw-r--r--nbxmpp/structs.py5
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()