Skip to content

Commit 75d6683

Browse files
Merge branch 'master' into webb/import-gate-grpcio
2 parents bcfdbc6 + c9f06b7 commit 75d6683

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
@@ -34,7 +34,6 @@ def pytest_generate_tests(metafunc):
3434
"opentelemetry",
3535
"pure_eval",
3636
"ray",
37-
"trytond",
3837
"typer",
3938
},
4039
)

0 commit comments

Comments
 (0)