Skip to content

Commit d2cbf74

Browse files
authored
Merge branch 'master' into ivana/make-logs-and-metrics-go-via-scope
2 parents 7ccbd5a + c9f06b7 commit d2cbf74

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sentry_sdk/integrations/trytond.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
from sentry_sdk.integrations import Integration
33
from sentry_sdk.integrations.wsgi import SentryWsgiMiddleware
44
from sentry_sdk.utils import ensure_integration_enabled, event_from_exception
5+
from sentry_sdk.integrations import DidNotEnable
56

6-
from trytond.exceptions import TrytonException # type: ignore
7-
from trytond.wsgi import app # type: ignore
8-
7+
try:
8+
from trytond.exceptions import TrytonException # type: ignore
9+
from trytond.wsgi import app # type: ignore
10+
except ImportError:
11+
raise DidNotEnable("Trytond is not installed.")
912

1013
# TODO: trytond-worker, trytond-cron and trytond-admin intergations
1114

tests/test_shadowed_module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def pytest_generate_tests(metafunc):
3535
"opentelemetry",
3636
"pure_eval",
3737
"ray",
38-
"trytond",
3938
"typer",
4039
},
4140
)

0 commit comments

Comments
 (0)