diff options
author | Steven Knight <knight@baldmt.com> | 2004-07-13 00:07:19 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-07-13 00:07:19 (GMT) |
commit | 321ac083cf44290c309b7021594c3941bfa3f82f (patch) | |
tree | 6252e83c8b56d8fc9a8d28a2472fd805f6242aaa /src/engine/SCons/Errors.py | |
parent | bb10501c96110a8f9a9068344c7f89e79e97fef2 (diff) | |
download | SCons-321ac083cf44290c309b7021594c3941bfa3f82f.zip SCons-321ac083cf44290c309b7021594c3941bfa3f82f.tar.gz SCons-321ac083cf44290c309b7021594c3941bfa3f82f.tar.bz2 |
Make exception handling conform to Pythonic standards. (Kevin Quick)
Diffstat (limited to 'src/engine/SCons/Errors.py')
-rw-r--r-- | src/engine/SCons/Errors.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/engine/SCons/Errors.py b/src/engine/SCons/Errors.py index 0a57614..283e681 100644 --- a/src/engine/SCons/Errors.py +++ b/src/engine/SCons/Errors.py @@ -36,25 +36,22 @@ class BuildError(Exception): def __init__(self, node=None, errstr="Unknown error", *args): self.node = node self.errstr = errstr - self.args = args + apply(Exception.__init__, (self,) + args) class InternalError(Exception): - def __init__(self, args=None): - self.args = args + pass class UserError(Exception): - def __init__(self, args=None): - self.args = args + pass class StopError(Exception): - def __init__(self, args=None): - self.args = args + pass class ExplicitExit(Exception): def __init__(self, node=None, status=None, *args): self.node = node self.status = status - self.args = args + apply(Exception.__init__, (self,) + args) class ConfigureDryRunError(UserError): """Raised when a file needs to be updated during a Configure process, @@ -67,4 +64,4 @@ class TaskmasterException(Exception): self.type = type self.value = value self.traceback = traceback - self.args = args + apply(Exception.__init__, (self,) + args) |