Skip to content

Commit b74e17d

Browse files
simplify mcp URI type check
1 parent d226d31 commit b74e17d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sentry_sdk/integrations/mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ async def _handler_wrapper(
495495
uri = original_kwargs.get("uri")
496496

497497
protocol = None
498-
if uri is not None and getattr(uri, "scheme", None) is not None:
498+
if uri is not None and hasattr(uri, "scheme"):
499499
protocol = uri.scheme
500500
elif handler_name and "://" in handler_name:
501501
protocol = handler_name.split("://")[0]

0 commit comments

Comments
 (0)