diff options
author | mathieui <mathieui@mathieui.net> | 2014-11-02 17:57:03 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-11-02 17:57:03 +0100 |
commit | 5cd854f7ccd888cff08f64bad418f7ddea32291a (patch) | |
tree | d7b5fdbc0fe141760cb98c2e93d7504505602bed /src/core/handlers.py | |
parent | 1c1ab3cb839e5509db52770e10c7190f844eb2e5 (diff) | |
download | poezio-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.py | 7 |
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 |