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
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-04-05 20:44:00 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-04-05 20:44:00 +0300
commita841e0c686b4ba741d38a5766effb0c641ed451e (patch)
treee64764527624e353479546b7f20512ce18f7cefd
parent5f043c96e0eeaecca3308352cf58669fcc3440a7 (diff)
[omemo] Make python-cryptography mandatory
-rw-r--r--omemo/omemoplugin.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/omemo/omemoplugin.py b/omemo/omemoplugin.py
index 9b8167a..abc3641 100644
--- a/omemo/omemoplugin.py
+++ b/omemo/omemoplugin.py
@@ -37,7 +37,6 @@ from .xmpp import (
DevicelistPEP, OmemoMessage, successful, unpack_device_bundle,
unpack_device_list_update, unpack_encrypted)
-from .file_decryption import FileDecryption
from common import demandimport
demandimport.enable()
demandimport.ignore += ['_imp', '_thread', 'axolotl', 'PIL',
@@ -45,6 +44,7 @@ demandimport.ignore += ['_imp', '_thread', 'axolotl', 'PIL',
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'
@@ -60,6 +60,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:
prototest = __import__('google.protobuf')
except Exception as e:
log.error(e)