reword _get_exc_class_and_code docstring

This commit is contained in:
David Lord 2019-06-12 14:08:27 -07:00
parent d8d74b0cc8
commit 6ec98f0749
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8

View file

@ -1270,10 +1270,12 @@ class Flask(_PackageBoundObject):
@staticmethod @staticmethod
def _get_exc_class_and_code(exc_class_or_code): def _get_exc_class_and_code(exc_class_or_code):
"""Ensure that we register only exceptions as handler keys """Get the exception class being handled. For HTTP status codes
or ``HTTPException`` subclasses, return both the exception and
status code.
:param exc_class_or_code: the class for the exception, or :param exc_class_or_code: Any exception class, or an HTTP status
exception code as integer code as an integer.
""" """
if isinstance(exc_class_or_code, integer_types): if isinstance(exc_class_or_code, integer_types):
exc_class = default_exceptions[exc_class_or_code] exc_class = default_exceptions[exc_class_or_code]