Skip to content

Commit 38f279b

Browse files
committed
handle not installed import error
1 parent 4ee3667 commit 38f279b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sentry_sdk/integrations/unleash.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33

44
import sentry_sdk
55
from sentry_sdk.flag_utils import flag_error_processor
6-
from sentry_sdk.integrations import Integration
6+
from sentry_sdk.integrations import Integration, DidNotEnable
77

8-
from UnleashClient import UnleashClient
8+
try:
9+
from UnleashClient import UnleashClient
10+
except ImportError:
11+
raise DidNotEnable("UnleashClient is not installed")
912

1013
if TYPE_CHECKING:
1114
from typing import Any

0 commit comments

Comments
 (0)