Skip to content

Commit

Permalink
Don't passthrough_errors unless instructed.
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Sep 6, 2016
1 parent ccd02bf commit 9c2e2e9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,6 @@ def run(self, host=None, port=None, debug=None, **options):
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:
Expand Down
3 changes: 1 addition & 2 deletions flask/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down
2 changes: 0 additions & 2 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,8 +1268,6 @@ def run_simple_mock(*args, **kwargs):
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():
Expand Down

0 comments on commit 9c2e2e9

Please sign in to comment.