summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-01-12 22:26:15 -0800
committerLance Stout <lancestout@gmail.com>2012-01-12 22:26:15 -0800
commit1ae219025a3f3369a76dfd9c2ab3fea6c05bfccc (patch)
treeb4598e8bce198c5e60caa0eb82cfd50e1f81e00e /sleekxmpp
parente8b2dd669815a28b045e070f07bebed6770b82b8 (diff)
downloadslixmpp-1ae219025a3f3369a76dfd9c2ab3fea6c05bfccc.tar.gz
slixmpp-1ae219025a3f3369a76dfd9c2ab3fea6c05bfccc.tar.bz2
slixmpp-1ae219025a3f3369a76dfd9c2ab3fea6c05bfccc.tar.xz
slixmpp-1ae219025a3f3369a76dfd9c2ab3fea6c05bfccc.zip
Don't dump exception logs for XML stream parsing errors.
The exceptions are handled, so we don't need to clutter the output logs.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/basexmpp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 11e787ad..e4fd03a1 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -763,6 +763,11 @@ class BaseXMPP(XMLStream):
iq = exception.iq
log.error('Request timed out: %s', iq)
log.warning('You should catch IqTimeout exceptions')
+ elif isinstance(exception, SyntaxError):
+ # Hide stream parsing errors that occur when the
+ # stream is disconnected (they've been handled, we
+ # don't need to make a mess in the logs).
+ pass
else:
log.exception(exception)