Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/omemo
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-04-05 21:06:26 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-04-05 21:06:26 +0300
commit77f90fbe67b5ffcf27dbb25e2837ff9acd86b2b0 (patch)
treec56d1cc6d1dc52cbc829d6b0557369ae3b793742 /omemo
parentc5e927ebc1644a3908ae04c72aa0da55aa982bd7 (diff)
[omemo] Make python-cryptography mandatory
Diffstat (limited to 'omemo')
-rw-r--r--omemo/omemoplugin.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/omemo/omemoplugin.py b/omemo/omemoplugin.py
index 055ffb7..eec31c5 100644
--- a/omemo/omemoplugin.py
+++ b/omemo/omemoplugin.py
@@ -30,7 +30,6 @@ from plugins import GajimPlugin
from plugins.helpers import log_calls
from nbxmpp.simplexml import Node
from nbxmpp import NS_CORRECT, NS_ADDRESS
-from .file_decryption import FileDecryption
from .xmpp import (
NS_NOTIFY, NS_OMEMO, NS_EME, BundleInformationAnnouncement,
@@ -41,6 +40,7 @@ from .xmpp import (
IQ_CALLBACK = {}
+CRYPTOGRAPHY_MISSING = 'You are missing Python-Cryptography'
AXOLOTL_MISSING = 'You are missing Python-Axolotl or use an outdated version'
PROTOBUF_MISSING = 'OMEMO cant import Google Protobuf, you can find help in ' \
'the GitHub Wiki'
@@ -56,6 +56,12 @@ DB_DIR_NEW = configpaths.gajimpaths['MY_DATA']
log = logging.getLogger('gajim.plugin_system.omemo')
try:
+ from .file_decryption import FileDecryption
+except Exception as e:
+ log.exception(e)
+ ERROR_MSG = CRYPTOGRAPHY_MISSING
+
+try:
import google.protobuf
except Exception as e:
log.error(e)