diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-05-08 18:34:42 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-05-08 18:34:42 -0400 |
commit | 804a564ac24ff22cd46583fa98d8140a8b10f476 (patch) | |
tree | fadba99af49b4da97be1a5b7ab7af42cb780db39 /cobbler/collection_systems.py | |
parent | d4f71b4318fedf374844030095c6c8dd544f0e92 (diff) | |
download | third_party-cobbler-804a564ac24ff22cd46583fa98d8140a8b10f476.tar.gz third_party-cobbler-804a564ac24ff22cd46583fa98d8140a8b10f476.tar.xz third_party-cobbler-804a564ac24ff22cd46583fa98d8140a8b10f476.zip |
Adding exception handling to remove the problem of propogating error codes all the way up the stack. Still not quite super-consistant, but getting there. Util functions still return true/false since they just ask questions, but API functions will throw errors to ensure they are being dealt with. Main CLI class needs to take advantage of this fact and become simpler. Tests are already modified to detect new exceptions with one exception :)
Diffstat (limited to 'cobbler/collection_systems.py')
-rw-r--r-- | cobbler/collection_systems.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cobbler/collection_systems.py b/cobbler/collection_systems.py index 3147a67..aa26571 100644 --- a/cobbler/collection_systems.py +++ b/cobbler/collection_systems.py @@ -8,7 +8,7 @@ Michael DeHaan <mdehaan@redhat.com> import item_system as system import utils import collection -from cobbler_exception import CobblerException +import cexceptions #-------------------------------------------- @@ -33,5 +33,5 @@ class Systems(collection.Collection): if self.find(name): del self.listing[name] return True - raise CobblerException("delete_nothing") + raise cexceptions.CobblerException("delete_nothing") |