mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
inherit from Exception where it needs to be
inherit from Exception where it needs to be and document why we use BaseException. fix #997
This commit is contained in:
parent
9e9f1b6cca
commit
44ac4e457f
@ -4,6 +4,8 @@
|
||||
# See the NOTICE for more information.
|
||||
|
||||
|
||||
# we inherit from BaseException here to make sure to not be caucght
|
||||
# at application level
|
||||
class HaltServer(BaseException):
|
||||
def __init__(self, reason, exit_status=1):
|
||||
self.reason = reason
|
||||
@ -13,7 +15,7 @@ class HaltServer(BaseException):
|
||||
return "<HaltServer %r %d>" % (self.reason, self.exit_status)
|
||||
|
||||
|
||||
class ConfigError(BaseException):
|
||||
class ConfigError(Exception):
|
||||
""" Exception raised on config error """
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user