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:
Benoit Chesneau 2015-10-09 07:48:18 +09:00
parent 9e9f1b6cca
commit 44ac4e457f

View File

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