Skip to content
Myr

Disable debug when FLASK_DEBUG=False (#2155)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Convert FLASK_DEBUG envvar to lower before test if in tuple

authored by Kim Blomqvist · committed by David Lord · parent 47e8410 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:flask/helpers.py+1 added-1 removed
56 unmodified lines
57def get_debug_flag(default=None):58 val = os.environ.get('FLASK_DEBUG')59 if not val:60 return default61 return val not in ('0', 'false', 'no')61 return val.lower() not in ('0', 'false', 'no')626364def _endpoint_from_view_func(view_func):65 """Internal helper that returns the default endpoint for a given
895 unmodified lines