Skip to content
Snippets Groups Projects
Commit 35a7f7bc authored by Liorithiel's avatar Liorithiel
Browse files

Show general error desc if the stanza doesn't have error code.

parent 7646e94f
No related branches found
No related tags found
No related merge requests found
......@@ -373,10 +373,13 @@ class CommandWindow:
if errorid is not None:
# we've got error code, display appropriate message
errorname = xmpp.NS_STANZAS + ' ' + str(errorid)
errordesc = xmpp.ERRORS[errorname][2]
error = errordesc.decode('utf-8')
del errorname, errordesc
try:
errorname = xmpp.NS_STANZAS + ' ' + str(errorid)
errordesc = xmpp.ERRORS[errorname][2]
error = errordesc.decode('utf-8')
del errorname, errordesc
except KeyError: # when stanza doesn't have error description
error = 'Service returned an error.'
elif error is not None:
# we've got error message
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment