summaryrefslogtreecommitdiffstats
path: root/py/mock/exception.py
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-12-02 15:21:05 -0600
committerMichael E Brown <mebrown@michaels-house.net>2007-12-02 15:21:05 -0600
commit229ce9c838bc2d78dfd5dcbfbe97fce859694811 (patch)
tree2b3ac4fbf113199d9a09645c0ff91550013f35cb /py/mock/exception.py
parent315fd0b88b0c263e83bcc47fbeb242c38ed01d02 (diff)
downloadmock-229ce9c838bc2d78dfd5dcbfbe97fce859694811.tar.gz
mock-229ce9c838bc2d78dfd5dcbfbe97fce859694811.tar.xz
mock-229ce9c838bc2d78dfd5dcbfbe97fce859694811.zip
mostly whitespace fixes, plus a few other things to make pylint/pychecker happier. No significant code changes.
Diffstat (limited to 'py/mock/exception.py')
-rw-r--r--py/mock/exception.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/py/mock/exception.py b/py/mock/exception.py
index aee93b9..d93fcf3 100644
--- a/py/mock/exception.py
+++ b/py/mock/exception.py
@@ -4,14 +4,16 @@
# Sections taken from Mach by Thomas Vander Stichele
# Major reorganization and adaptation by Michael Brown
# Copyright (C) 2007 Michael E Brown <mebrown@michaels-house.net>
+"""define most of the exceptions used."""
# python library imports
-from exceptions import Exception
+#from exceptions import Exception
# our imports
# classes
class Error(Exception):
+ "base class for our errors."
def __init__(self, msg):
Exception.__init__(self)
self.msg = msg
@@ -32,36 +34,42 @@ class Error(Exception):
# 60 = buildroot locked
class BuildError(Error):
+ "rpmbuild failed."
def __init__(self, msg):
Error.__init__(self, msg)
self.msg = msg
self.resultcode = 10
class RootError(Error):
+ "failed to set up chroot"
def __init__(self, msg):
Error.__init__(self, msg)
self.msg = msg
self.resultcode = 20
-class YumError(Error):
+class YumError(RootError):
+ "yum failed."
def __init__(self, msg):
- Error.__init__(self, msg)
+ RootError.__init__(self, msg)
self.msg = msg
self.resultcode = 30
class PkgError(Error):
+ "error with the srpm given to us."
def __init__(self, msg):
Error.__init__(self, msg)
self.msg = msg
self.resultcode = 40
class BuildRootLocked(Error):
+ "build root in use by another process."
def __init__(self, msg):
Error.__init__(self, msg)
self.msg = msg
self.resultcode = 60
class BadCmdline(Error):
+ "user gave bad/inconsistent command line."
def __init__(self, msg):
Error.__init__(self, msg)
self.msg = msg