summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cobbler/commands.py2
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)