Removed unused http code get function

This commit is contained in:
Phil Schaf 2014-12-25 16:11:11 +01:00
parent 7126a22334
commit a6c6cc18f5

View file

@ -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]