Disable debug when FLASK_DEBUG=False (#2155)

Convert FLASK_DEBUG envvar to lower before test if in tuple
This commit is contained in:
Kim Blomqvist 2017-01-17 17:15:51 +02:00 committed by David Lord
parent 47e8410117
commit 3fc8be5a4e

View file

@ -58,7 +58,7 @@ def get_debug_flag(default=None):
val = os.environ.get('FLASK_DEBUG')
if not val:
return default
return val not in ('0', 'false', 'no')
return val.lower() not in ('0', 'false', 'no')
def _endpoint_from_view_func(view_func):