From c4bf2a689c2fb2e6d5f5ac4f7b22a5c4ac9e3dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 23 Jan 2024 21:48:27 +0100 Subject: =?UTF-8?q?fix:=20Don=E2=80=99t=20fail=20to=20start=20on=20sentry?= =?UTF-8?q?=5Fsdk=20import=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gajim/common/app.py | 5 ++++- gajim/gtk/exception.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gajim/common/app.py b/gajim/common/app.py index d0c694d23..82eb27f0c 100644 --- a/gajim/common/app.py +++ b/gajim/common/app.py @@ -287,7 +287,10 @@ def detect_dependencies() -> None: try: import sentry_sdk # noqa: F401 _dependencies['SENTRY_SDK'] = True - except ImportError: + except Exception: + # Sentry has a lot of side effects on import + # make sure this optional dependency does not prevent + # Gajim from starting pass # Print results diff --git a/gajim/gtk/exception.py b/gajim/gtk/exception.py index 6b3fa2fd5..b0f784993 100644 --- a/gajim/gtk/exception.py +++ b/gajim/gtk/exception.py @@ -52,7 +52,10 @@ from gajim.gtk.util import get_gtk_version try: import sentry_sdk -except ImportError: +except Exception: + # Sentry has a lot of side effects on import + # make sure this optional dependency does not prevent + # Gajim from starting pass _exception_in_progress = threading.Lock() -- cgit v1.2.3