Skip to content

Commit 3b5e14e

Browse files
committed
Fix order of logic
1 parent 4536418 commit 3b5e14e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

newrelic/hooks/framework_starlette.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def instrument_starlette_exceptions(module):
254254
# that it isn't being imported through a deprecation and double wrapped.
255255

256256
# After v0.45.0, the import proxy for ExceptionMiddleware was removed from starlette.exceptions
257-
if hasattr(module, "ExceptionMiddleware") and not hasattr(module, "__deprecated__"):
257+
if not hasattr(module, "__deprecated__") and hasattr(module, "ExceptionMiddleware"):
258258

259259
wrap_function_wrapper(module, "ExceptionMiddleware.__call__", error_middleware_wrapper)
260260

0 commit comments

Comments
 (0)