summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-08-23 11:27:58 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2019-12-27 18:57:33 +0100
commit33a1519a3914906566de656daa63a5a778cf3a5b (patch)
tree3ffde48b27092c3d56c347e4ab093e886a9ef500 /plugins
parentcbe96a6f77e54fc0c4c40d1e81faab29c9de3946 (diff)
downloadpoezio-33a1519a3914906566de656daa63a5a778cf3a5b.tar.gz
poezio-33a1519a3914906566de656daa63a5a778cf3a5b.tar.bz2
poezio-33a1519a3914906566de656daa63a5a778cf3a5b.tar.xz
poezio-33a1519a3914906566de656daa63a5a778cf3a5b.zip
omemo: Catch IqError and IqTimeout and display generic message for now
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omemo_plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/omemo_plugin.py b/plugins/omemo_plugin.py
index c676267a..345925f6 100644
--- a/plugins/omemo_plugin.py
+++ b/plugins/omemo_plugin.py
@@ -17,6 +17,7 @@ from poezio.xdg import DATA_HOME
from omemo.exceptions import MissingBundleException
from slixmpp.stanza import Message
+from slixmpp.exceptions import IqError, IqTimeout
from slixmpp_omemo import PluginCouldNotLoad, MissingOwnKey, NoAvailableSession
from slixmpp_omemo import UndecidedException, UntrustedException, EncryptionPrepareException
import slixmpp_omemo
@@ -144,6 +145,11 @@ class Plugin(E2EEPlugin):
)
device_list = expect_problems.setdefault(exn.bare_jid, [])
device_list.append(exn.device)
+ except (IqError, IqTimeout) as exn:
+ self.display_error(
+ 'An error occured while fetching information on a recipient.\n%r' % exn,
+ )
+ return None
except Exception as exn:
self.display_error(
'An error occured while attempting to encrypt.\n%r' % exn,