Mercurial > libervia-backend
diff sat/plugins/plugin_sec_otr.py @ 2726:a86f494457c2
plugin OTR: catch and log potr.context.ErrorReceived instead of raising it.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 26 Dec 2018 17:18:52 +0100 |
parents | c26492bd2144 |
children | da59ff099b32 |
line wrap: on
line diff
--- a/sat/plugins/plugin_sec_otr.py Wed Dec 26 14:37:13 2018 +0100 +++ b/sat/plugins/plugin_sec_otr.py Wed Dec 26 17:18:52 2018 +0100 @@ -595,6 +595,12 @@ feedback = msg client.feedback(from_jid, msg) raise failure.Failure(exceptions.CancelError(msg)) + except potr.context.ErrorReceived as e: + msg = D_(u"WARNING: received OTR error message: {msg}".format(msg=e)) + log.warning(msg) + feedback = msg + client.feedback(from_jid, msg) + raise failure.Failure(exceptions.CancelError(msg)) except StopIteration: return data else: