Skip to content

Commit

Permalink
Merge pull request #624 from hiaselhans/improve_startup_time
Browse files Browse the repository at this point in the history
remove context from inspect.stack
  • Loading branch information
vitalik committed Dec 9, 2022
2 parents 20ad109 + a5d199a commit 327afb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ninja/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ def is_debug_server() -> bool:
"""Check if running under the Django Debug Server"""
return settings.DEBUG and any(
s.filename.endswith("runserver.py") and s.function == "run"
for s in inspect.stack()[1:]
for s in inspect.stack(0)[1:]
)

0 comments on commit 327afb7

Please sign in to comment.