Don't passthrough_errors unless instructed. (#2006)

Fix #2005

Revert #1679 and #1996
This commit is contained in:
Markus Unterwaditzer 2016-09-06 22:32:34 +02:00 committed by GitHub
parent ccd02bfe8c
commit c4ec6954e5
3 changed files with 1 additions and 6 deletions

View file

@ -838,8 +838,6 @@ class Flask(_PackageBoundObject):
self.debug = bool(debug)
options.setdefault('use_reloader', self.debug)
options.setdefault('use_debugger', self.debug)
options.setdefault('passthrough_errors',
self.config['PROPAGATE_EXCEPTIONS'])
try:
run_simple(host, port, self, **options)
finally:

View file

@ -429,8 +429,7 @@ def run_command(info, host, port, reload, debugger, eager_loading,
print(' * Forcing debug mode %s' % (debug and 'on' or 'off'))
run_simple(host, port, app, use_reloader=reload,
use_debugger=debugger, threaded=with_threads,
passthrough_errors=app.config['PROPAGATE_EXCEPTIONS'])
use_debugger=debugger, threaded=with_threads)
@click.command('shell', short_help='Runs a shell in the app context.')

View file

@ -1268,8 +1268,6 @@ def test_werkzeug_passthrough_errors(monkeypatch, debug, use_debugger,
monkeypatch.setattr(werkzeug.serving, 'run_simple', run_simple_mock)
app.config['PROPAGATE_EXCEPTIONS'] = propagate_exceptions
app.run(debug=debug, use_debugger=use_debugger, use_reloader=use_reloader)
# make sure werkzeug passes errors through if PROPAGATE_EXCEPTIONS
assert rv['passthrough_errors'] == propagate_exceptions
def test_max_content_length():