From f3186abf09bdf6d9eda0fb30002bb95ac064448c Mon Sep 17 00:00:00 2001 From: Raphael Deem Date: Sat, 20 May 2017 10:29:00 -0700 Subject: [PATCH] SANIC_EXCEPTIONS -> _sanic_exceptions --- sanic/exceptions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sanic/exceptions.py b/sanic/exceptions.py index 3a501983..ca836647 100644 --- a/sanic/exceptions.py +++ b/sanic/exceptions.py @@ -117,16 +117,16 @@ INTERNAL_SERVER_ERROR_HTML = ''' ''' -SANIC_EXCEPTIONS = {} +_sanic_exceptions= {} def add_status_code(code): """ - Decorator used for adding exceptions to SANIC_EXCEPTIONS. + Decorator used for adding exceptions to _sanic_exceptions. """ def class_decorator(cls): cls.status_code = code - SANIC_EXCEPTIONS[code] = cls + _sanic_exceptions[code] = cls return cls return class_decorator @@ -209,5 +209,5 @@ def abort(status_code, message=None): if message is None: message = COMMON_STATUS_CODES.get(status_code, ALL_STATUS_CODES.get(status_code)) - sanic_exception = SANIC_EXCEPTIONS.get(status_code, SanicException) + sanic_exception = _sanic_exceptions.get(status_code, SanicException) raise sanic_exception(message=message, status_code=status_code)