diff options
author | Chris Lumens <clumens@redhat.com> | 2008-06-05 14:39:27 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-06-05 14:39:27 -0400 |
commit | 4e15268407c353239c55715c5cbffcd25d8fb74f (patch) | |
tree | e9a49a95b00cec248edf58db45d3c5fb3a45c9e5 | |
parent | 494fcc58c247206d3d8ad8cb9f2755266e2ddab4 (diff) | |
download | anaconda-4e15268407c353239c55715c5cbffcd25d8fb74f.tar.gz anaconda-4e15268407c353239c55715c5cbffcd25d8fb74f.tar.xz anaconda-4e15268407c353239c55715c5cbffcd25d8fb74f.zip |
Start an errors.py that contains all these small exception classes.
-rw-r--r-- | backend.py | 7 | ||||
-rw-r--r-- | errors.py | 6 | ||||
-rw-r--r-- | kickstart.py | 2 | ||||
-rw-r--r-- | yuminstall.py | 3 |
4 files changed, 9 insertions, 9 deletions
diff --git a/backend.py b/backend.py index 08cbdde9d..14848b5c5 100644 --- a/backend.py +++ b/backend.py @@ -37,13 +37,6 @@ log = logging.getLogger("anaconda") import gettext _ = lambda x: gettext.ldgettext("anaconda", x) -class NoSuchGroup(Exception): - def __init__ (self, value): - self.value = value - - def __str__ (self): - return self.value - class AnacondaBackend: def __init__(self, anaconda): """Abstract backend class all backends should inherit from this diff --git a/errors.py b/errors.py new file mode 100644 index 000000000..fd8b5805e --- /dev/null +++ b/errors.py @@ -0,0 +1,6 @@ +class NoSuchGroup(Exception): + def __init__ (self, value): + self.value = value + + def __str__ (self): + return self.value diff --git a/kickstart.py b/kickstart.py index 5bbc1f590..cfa941cb7 100644 --- a/kickstart.py +++ b/kickstart.py @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -from backend import NoSuchGroup +from errors import * import iutil import isys import os diff --git a/yuminstall.py b/yuminstall.py index f2423d81a..d997545cd 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -18,6 +18,7 @@ # from flags import flags +from errors import * import sys import os @@ -39,7 +40,7 @@ import iniparse from yum.constants import * from yum.Errors import RepoError, YumBaseError, PackageSackError from yum.yumRepo import YumRepository -from backend import AnacondaBackend, NoSuchGroup +from backend import AnacondaBackend from product import productName, productStamp from sortedtransaction import SplitMediaTransactionData from constants import * |