mock mock.py,1.23,1.24

Seth Vidal (skvidal) fedora-extras-commits at redhat.com
Tue Jul 26 20:36:43 UTC 2005


Author: skvidal

Update of /cvs/fedora/mock
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31367

Modified Files:
	mock.py 
Log Message:

fix exception handling



Index: mock.py
===================================================================
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- mock.py	26 Jul 2005 20:17:29 -0000	1.23
+++ mock.py	26 Jul 2005 20:36:41 -0000	1.24
@@ -25,6 +25,7 @@
 import shutil
 import types
 import grp
+from exceptions import Exception
 
 from optparse import OptionParser
 
@@ -36,31 +37,31 @@
 
 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
 




More information about the fedora-extras-commits mailing list