8000 Use isinstance instead of type · davidcroda/sentry-python@2792d17 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2792d17

Browse files
Use isinstance instead of type
Co-authored-by: Ivana Kellyerova <ivana.kellyerova@sentry.io>
1 parent 5d30d73 commit 2792d17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/aws_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
140140
headers = request_data.get("headers", {})
141141
# Some AWS Services (ie. EventBridge) set headers as a list
142142
# or None, so we must ensure it is a dict
143-
if type(headers) is not dict:
143+
if not isinstance(headers, dict):
144144
headers = {}
145145

146146
transaction = continue_trace(

0 commit comments

Comments
 (0)
0