Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added brackets to list comprehension, fixing this exception: #174

Merged
merged 2 commits into from
Jan 17, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added brackets to list comprehension, fixing this exception:
Traceback (most recent call last):
  File "/Users/ricardopinto/a_project/env/lib/python3.6/site-packages/structlog/_frames.py", line 42, in <genexpr>
    while any(name.startswith(i) for i in ignores):
SystemError: error return without exception set
  • Loading branch information
ricardopinto committed Jul 6, 2018
commit 323f5fd13630e5a6357f418da971043ef550b45f
2 changes: 1 addition & 1 deletion src/structlog/_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _find_first_app_frame_and_name(additional_ignores=None):
ignores = ["structlog"] + (additional_ignores or [])
f = sys._getframe()
name = f.f_globals.get("__name__") or "?"
while any(name.startswith(i) for i in ignores):
while any([name.startswith(i) for i in ignores]):
if f.f_back is None:
name = "?"
break
Expand Down