Commit a841e0c6 authored by Philipp Hörist's avatar Philipp Hörist

[omemo] Make python-cryptography mandatory

parent 5f043c96
......@@ -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'
......@@ -59,6 +59,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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment