diff options
author | John Smith <mrdoctorwho@gmail.com> | 2017-02-18 07:06:45 +0300 |
---|---|---|
committer | John Smith <mrdoctorwho@gmail.com> | 2017-02-18 07:06:45 +0300 |
commit | 4f78359cb1cdd5b544aa6eccb1475563394b7385 (patch) | |
tree | 1f9256ca8e35b635281bd49b8ea3055d95b1a6de /modules | |
parent | ba9b8e507690243bd1cf9f20cd927bdc84c1818f (diff) |
Don't log a crash if the error is TokenError3.5
Bump version to 3.5
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mod_prs_main.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/mod_prs_main.py b/modules/mod_prs_main.py index 9c9da11..858f4e6 100644 --- a/modules/mod_prs_main.py +++ b/modules/mod_prs_main.py @@ -22,12 +22,14 @@ def initializeUser(source, resource, prs): user.connect() except RuntimeError: pass - except Exception: + except Exception as e: + if not isinstance(e, TokenError): + report(crashLog("user.connect")) sendMessage(source, TransportID, _("Auth failed! If this error repeated, " "please register again." " This incident will be reported.\nCause: %s") % returnExc()) - report(crashLog("user.connect")) + logger.error("Failed to authenicate user! Error: %s (jid: %s)", e.message, source) else: user.initialize(send=True, resource=resource) # probably we need to know resource a bit earlier than this time utils.runThread(executeHandlers, ("prs01", (source, prs))) |