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

github.com/mrDoctorWho/vk4xmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Smith <mrdoctorwho@gmail.com>2017-02-18 07:06:45 +0300
committerJohn Smith <mrdoctorwho@gmail.com>2017-02-18 07:06:45 +0300
commit4f78359cb1cdd5b544aa6eccb1475563394b7385 (patch)
tree1f9256ca8e35b635281bd49b8ea3055d95b1a6de
parentba9b8e507690243bd1cf9f20cd927bdc84c1818f (diff)
Don't log a crash if the error is TokenError3.5
Bump version to 3.5
-rw-r--r--gateway.py2
-rw-r--r--modules/mod_prs_main.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/gateway.py b/gateway.py
index 4400ae3..8161f2a 100644
--- a/gateway.py
+++ b/gateway.py
@@ -7,7 +7,7 @@
__author__ = "mrDoctorWho <mrdoctorwho@gmail.com>"
__license__ = "MIT"
-__version__ = "3.0"
+__version__ = "3.5"
import hashlib
import httplib
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)))