Skip to content
Myr

Removed unused http code get function

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

authored by Phil Schaf · committed by Phil Schaf · parent 7126a22 · Browse files · 1 file+2 added−11 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+2 added−11 removed

  • other:+2 added−11 removed

1 file+2 added−11 removed

modified:flask/app.py+2 added-11 removed
63 unmodified lines
64 return f(self, *args, **kwargs)65 return update_wrapper(wrapper_func, f)666768def get_http_code(error_class_or_instance):69 if (70 isinstance(error_class_or_instance, HTTPException) or71 isinstance(error_class_or_instance, type) and72 issubclass(error_class_or_instance, HTTPException)73 ):74 return error_class_or_instance.code75 return None767768class ExceptionHandlerDict(Mapping):69 """A dict storing exception handlers or falling back to the default ones70 71 Designed to be app.error_handler_spec[blueprint_or_none]
10 unmodified lines
82 self.fallback = app.error_handler_spec[None]83 else:84 self.fallback = {}85 86 @staticmethod96 def get_class(self, exc_class_or_code):87 def get_class(exc_class_or_code):88 if isinstance(exc_class_or_code, integer_types):89 # ensure that we register only exceptions as keys90 exc_class = default_exceptions[exc_class_or_code]91 else:
1912 unmodified lines