summaryrefslogtreecommitdiffstats
path: root/cobbler/cobbler.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-08-15 16:31:31 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-08-15 16:31:31 -0400
commit5e1781852fb81a3263692eda3b4977c8fb761c1a (patch)
treeb21cbb7fbfc4f0fcc2f5c37f1dc8da10cec85068 /cobbler/cobbler.py
parentcda9754a7ab3172ca45d083d7ee9d3bc7aa2c88e (diff)
downloadthird_party-cobbler-5e1781852fb81a3263692eda3b4977c8fb761c1a.tar.gz
third_party-cobbler-5e1781852fb81a3263692eda3b4977c8fb761c1a.tar.xz
third_party-cobbler-5e1781852fb81a3263692eda3b4977c8fb761c1a.zip
Ben Riggs patch to allow find to take arbitrary variables plus a reworking
of find (mpd) to add some error checking, list returns, and other semi-useful stuff. Plus tests and an optomization to allow name=foo as the only parameter to be just as fast as before.
Diffstat (limited to 'cobbler/cobbler.py')
-rwxr-xr-xcobbler/cobbler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py
index 13daabd..0f34eee 100755
--- a/cobbler/cobbler.py
+++ b/cobbler/cobbler.py
@@ -200,7 +200,7 @@ class BootCLI:
def __list_names2(self, collection, args):
for p in args:
- obj = collection.find(p)
+ obj = collection.find(name=p)
if obj is not None:
print obj.printable()
return True
@@ -269,7 +269,7 @@ class BootCLI:
control_fn(args,obj)
def __generic_edit(self,args,collection_fn,control_fn,exc_msg):
- obj = collection_fn().find(self.find_arg(args,"--name"))
+ obj = collection_fn().find(name=self.find_arg(args,"--name"))
name2 = self.find_arg(args,"--newname")
if name2 is not None:
raise CX("objects cannot be renamed with the edit command, use 'rename'")
@@ -278,7 +278,7 @@ class BootCLI:
control_fn(args,obj)
def __generic_copy(self,args,collection_fn,control_fn,exc_msg):
- obj = collection_fn().find(self.find_arg(args,"--name"))
+ obj = collection_fn().find(name=self.find_arg(args,"--name"))
obj2 = self.find_arg(args,"--newname")
if obj is None:
raise CX(exc_msg)