From e4d36472263eadaab242cdf12f721068856259d8 Mon Sep 17 00:00:00 2001 From: Sultan Iman <354868+sultaniman@users.noreply.github.com> Date: Sun, 12 May 2024 10:48:27 +0200 Subject: [PATCH] Catch MissingDependencyException in telemetry and check for sentry_sdk (#1344) * Catch MissingDependencyException in telemetry and check for sentry_sdk --- dlt/common/runtime/telemetry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlt/common/runtime/telemetry.py b/dlt/common/runtime/telemetry.py index 4b1106c1bd..28dde0206c 100644 --- a/dlt/common/runtime/telemetry.py +++ b/dlt/common/runtime/telemetry.py @@ -5,6 +5,7 @@ from typing import Any, Callable from dlt.common.configuration.specs import RunConfiguration +from dlt.common.exceptions import MissingDependencyException from dlt.common.typing import TFun from dlt.common.configuration import resolve_configuration from dlt.common.runtime.anon_tracker import ( @@ -50,7 +51,7 @@ def stop_telemetry() -> None: from dlt.common.runtime.sentry import disable_sentry disable_sentry() - except ImportError: + except (MissingDependencyException, ImportError): pass disable_anon_tracker()