Skip to content
Myr

Optimize loop in Flask._find_error_handler()

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

authored by laggardkernel · committed by Phil Jones · parent 0ce270d · 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:src/flask/app.py+1 added-1 removed
1274 unmodified lines
1275 class, or ``None`` if a suitable handler is not found.1276 """1277 exc_class, code = self._get_exc_class_and_code(type(e))12781279 for c in [code, None]:1279 for c in [code, None] if code is not None else [None]:1280 for name in chain(request.blueprints, [None]):1281 handler_map = self.error_handler_spec[name][c]12821283 if not handler_map:
808 unmodified lines