forked from orbit-oss/flask
Removed unused http code get function
This commit is contained in:
parent
7126a22334
commit
a6c6cc18f5
1 changed files with 2 additions and 11 deletions
13
flask/app.py
13
flask/app.py
|
|
@ -65,16 +65,6 @@ def setupmethod(f):
|
|||
return update_wrapper(wrapper_func, f)
|
||||
|
||||
|
||||
def get_http_code(error_class_or_instance):
|
||||
if (
|
||||
isinstance(error_class_or_instance, HTTPException) or
|
||||
isinstance(error_class_or_instance, type) and
|
||||
issubclass(error_class_or_instance, HTTPException)
|
||||
):
|
||||
return error_class_or_instance.code
|
||||
return None
|
||||
|
||||
|
||||
class ExceptionHandlerDict(Mapping):
|
||||
"""A dict storing exception handlers or falling back to the default ones
|
||||
|
||||
|
|
@ -93,7 +83,8 @@ class ExceptionHandlerDict(Mapping):
|
|||
else:
|
||||
self.fallback = {}
|
||||
|
||||
def get_class(self, exc_class_or_code):
|
||||
@staticmethod
|
||||
def get_class(exc_class_or_code):
|
||||
if isinstance(exc_class_or_code, integer_types):
|
||||
# ensure that we register only exceptions as keys
|
||||
exc_class = default_exceptions[exc_class_or_code]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue