diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2007-11-28 15:17:34 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2007-11-28 15:17:34 -0500 |
commit | 7305a94610599e118c257b11806fa7bf104c4ced (patch) | |
tree | b688ab8839bb4016e0609276b10c68a8ffcd0c21 | |
parent | c2dc5397d3f18c3aedd2de2b99e5414b39ba09ec (diff) | |
download | third_party-cobbler-7305a94610599e118c257b11806fa7bf104c4ced.tar.gz third_party-cobbler-7305a94610599e118c257b11806fa7bf104c4ced.tar.xz third_party-cobbler-7305a94610599e118c257b11806fa7bf104c4ced.zip |
Nicely warn when editing objects that do not exist.
-rw-r--r-- | cobbler/commands.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cobbler/commands.py b/cobbler/commands.py index e34e05a..bb801ae 100644 --- a/cobbler/commands.py +++ b/cobbler/commands.py @@ -203,6 +203,8 @@ class CobblerFunction: collect_fn().remove(self.options.name, with_delete=True) return None obj = collect_fn().find(self.options.name) + if obj is None: + raise CX(_("object named (%s) not found") % self.options.name) if not "copy" in self.args and not "rename" in self.args and self.options.name: obj.set_name(self.options.name) |