Skip to content
Myr

There was a duplicated call to url_adapter.build(...)

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

try: rv = url_adapter.build(endpoint, values, method=method, force_external=external) except BuildError, error: # We need to inject the values again so that the app callback can # deal with that sort of stuff. values['_external'] = external values['_anchor'] = anchor values['_method'] = method return appctx.app.handle_url_build_error(error, endpoint, values) rv = url_adapter.build(endpoint, values, method=method, force_external=external) If no exception was raised for url_adapter.build(...) then the same method call would be made after the try...except block. This is unnecessary.

authored by Mitchell Peabody · committed by Mitchell Peabody · parent a15c6c5 · Browse files · 1 file+0 added−2 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+0 added−2 removed

  • other:+0 added−2 removed

1 file+0 added−2 removed

modified:flask/helpers.py-2 removed
293 unmodified lines
294 values['_anchor'] = anchor295 values['_method'] = method296 return appctx.app.handle_url_build_error(error, endpoint, values)297298 rv = url_adapter.build(endpoint, values, method=method,299 force_external=external)298 if anchor is not None:299 rv += '#' + url_quote(anchor)300 return rv301
528 unmodified lines