From 4a8a9cebba964b30ae7422a675dec2981e191d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Wed, 28 Jun 2017 22:45:37 +0200 Subject: [omemo] Better handle exception - Print only warning instead of error, as the module is only optional - Log the error to the debug log, so users dont think we didnt catch the exception --- omemo/ui.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omemo/ui.py b/omemo/ui.py index 0d4bc8d..fd81339 100644 --- a/omemo/ui.py +++ b/omemo/ui.py @@ -43,9 +43,9 @@ try: else: import qrcodewin.main as qrcode PILLOW = True -except Exception as e: - log.exception('Error:') - log.error('pyton-qrcode or dependencies of it, are not available') +except ImportError as error: + log.debug(error) + log.warning('python-qrcode or dependencies of it are not available') # pylint: enable=import-error UNDECIDED = 2 -- cgit v1.2.3