diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-05-08 15:02:06 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-05-08 15:02:06 -0400 |
commit | d4f71b4318fedf374844030095c6c8dd544f0e92 (patch) | |
tree | dd5bb88c2587a0ab4ea2638374ad4a71bbd868a9 /cobbler/collection_profiles.py | |
parent | 038a4383ccb6230f927960a34288c5cf6fbd3455 (diff) | |
download | cobbler-d4f71b4318fedf374844030095c6c8dd544f0e92.tar.gz cobbler-d4f71b4318fedf374844030095c6c8dd544f0e92.tar.xz cobbler-d4f71b4318fedf374844030095c6c8dd544f0e92.zip |
Interim checkin while straightening out exceptions. The last_error bit reminded me of the
thing I hated most about Microsoft SDK/DDK programming (that being, last_error and inconsistant
error handling), so it had to go.
Diffstat (limited to 'cobbler/collection_profiles.py')
-rw-r--r-- | cobbler/collection_profiles.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cobbler/collection_profiles.py b/cobbler/collection_profiles.py index a5b19960..b1c92dd0 100644 --- a/cobbler/collection_profiles.py +++ b/cobbler/collection_profiles.py @@ -10,6 +10,7 @@ Michael DeHaan <mdehaan@redhat.com> import item_profile as profile import utils import collection +from cobbler_exception import CobblerException #-------------------------------------------- @@ -27,11 +28,9 @@ class Profiles(collection.Collection): """ for k,v in self.config.systems().listing.items(): if v.profile == name: - utils.set_error("orphan_system") - return False + raise CobblerException("orphan_system") if self.find(name): del self.listing[name] return True - utils.set_error("delete_nothing") - return False + raise CobblerException("delete_nothing") |