We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c694c2d + 05c7a8f commit 7f749e2Copy full SHA for 7f749e2
json_logging/util.py
@@ -184,9 +184,8 @@ def get_request_from_call_stack(self):
184
return f_locals['req']
185
186
for key in f_locals:
187
- if key is not 'request' and key is not 'req':
188
- if isinstance(f_locals[key], class_type):
189
- return f_locals[key]
+ if key not in {'request', 'req'} and isinstance(f_locals[key], class_type):
+ return f_locals[key]
190
if f.f_back is not None:
191
f = f.f_back
192
else:
0 commit comments