summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskvidal <skvidal>2005-07-26 20:36:41 +0000
committerskvidal <skvidal>2005-07-26 20:36:41 +0000
commitf2f20891bf2d7c2654a09fbfc92ad114d85e27ee (patch)
tree44f5685579429a54d331dd8222744a5d038305e6
parent4553c6143c93498c92ea49efeeacd393b3948acd (diff)
fix exception handling
-rw-r--r--mock.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mock.py b/mock.py
index eb66abe..71624a4 100644
--- a/mock.py
+++ b/mock.py
@@ -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