Skip to content
Myr

Reduce unnecessary function calls.

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

When propagate exceptions, the function call of "_find_error_handler" makes no sense.

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

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:flask/app.py+1 added-2 removed
1726 unmodified lines
17271728 .. versionadded:: 0.31729 """1730 exc_type, exc_value, tb = sys.exc_info()17311731 got_request_exception.send(self, exception=e)1733 handler = self._find_error_handler(InternalServerError())17321733 if self.propagate_exceptions:1734 # if we want to repropagate the exception, we can attempt to1735 # raise it with the whole traceback in case we can do that
4 unmodified lines
1740 else:1741 raise e17421743 self.log_exception((exc_type, exc_value, tb))1744 handler = self._find_error_handler(InternalServerError())1745 if handler is None:1746 return InternalServerError()1747 return self.finalize_request(handler(e), from_error_handler=True)1748
566 unmodified lines