summaryrefslogtreecommitdiff
path: root/src/core/handlers.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-11-02 17:57:03 +0100
committermathieui <mathieui@mathieui.net>2014-11-02 17:57:03 +0100
commit5cd854f7ccd888cff08f64bad418f7ddea32291a (patch)
treed7b5fdbc0fe141760cb98c2e93d7504505602bed /src/core/handlers.py
parent1c1ab3cb839e5509db52770e10c7190f844eb2e5 (diff)
downloadpoezio-5cd854f7ccd888cff08f64bad418f7ddea32291a.tar.gz
poezio-5cd854f7ccd888cff08f64bad418f7ddea32291a.tar.bz2
poezio-5cd854f7ccd888cff08f64bad418f7ddea32291a.tar.xz
poezio-5cd854f7ccd888cff08f64bad418f7ddea32291a.zip
Add a stream error handler in order to display error messages
Diffstat (limited to 'src/core/handlers.py')
-rw-r--r--src/core/handlers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/handlers.py b/src/core/handlers.py
index 648c3e4d..50dca216 100644
--- a/src/core/handlers.py
+++ b/src/core/handlers.py
@@ -859,6 +859,13 @@ def on_disconnected(self, event):
self.information(_("Auto-reconnecting."), _('Info'))
self.xmpp.connect()
+def on_stream_error(self, event):
+ """
+ When we receive a stream error
+ """
+ if event and event['text']:
+ self.information(_('Stream error: %s') % event['text'], _('Error'))
+
def on_failed_all_auth(self, event):
"""
Authentication failed