diff options
| author | skvidal <skvidal> | 2005-07-26 20:36:41 +0000 |
|---|---|---|
| committer | skvidal <skvidal> | 2005-07-26 20:36:41 +0000 |
| commit | f2f20891bf2d7c2654a09fbfc92ad114d85e27ee (patch) | |
| tree | 44f5685579429a54d331dd8222744a5d038305e6 | |
| parent | 4553c6143c93498c92ea49efeeacd393b3948acd (diff) | |
fix exception handling
| -rw-r--r-- | mock.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -25,6 +25,7 @@ import glob import shutil import types import grp +from exceptions import Exception from optparse import OptionParser @@ -36,31 +37,31 @@ def error(msg): class Error(Exception): def __init__(self, msg): - exceptions.Exception.__init__(self) + Exception.__init__(self) self.msg = msg self.resultcode = 1 class YumError(Error): def __init__(self, msg): - Error.__init__(self) + Error.__init__(self, msg) self.msg = msg self.resultcode = 30 class PkgError(Error): def __init__(self, msg): - Error.__init__(self) + Error.__init__(self, msg) self.msg = msg self.resultcode = 40 class BuildError(Error): def __init__(self, msg): - Error.__init__(self) + Error.__init__(self, msg) self.msg = msg self.resultcode = 10 class RootError(Error): def __init__(self, msg): - Error.__init__(self) + Error.__init__(self, msg) self.msg = msg self.resultcode = 20 |
