summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-05-14 15:58:44 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-05-14 15:58:44 -0400
commit9d5b494aaac2d2b0be4b598d6049eb869ef4b49c (patch)
treef410af7545c68eb9837f3400ba856f4ebb8cc6ee
parentda5afb37f3d5f8ce4e4ad0508206eb68c8db25c9 (diff)
downloadthird_party-cobbler-9d5b494aaac2d2b0be4b598d6049eb869ef4b49c.tar.gz
third_party-cobbler-9d5b494aaac2d2b0be4b598d6049eb869ef4b49c.tar.xz
third_party-cobbler-9d5b494aaac2d2b0be4b598d6049eb869ef4b49c.zip
Make template finder code (used by check and webapp) ignore kickstarts that are not on the filesystem and are therefore real kickstarts or URLs that generate them, not actual templates.
-rw-r--r--cobbler/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cobbler/utils.py b/cobbler/utils.py
index a63f7af..007b96c 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -798,10 +798,12 @@ def get_kickstart_templates(api):
files = {}
for x in api.profiles():
if x.kickstart is not None and x.kickstart != "" and x.kickstart != "<<inherit>>":
- files[x.kickstart] = 1
+ if os.path.exists(x.kickstart):
+ files[x.kickstart] = 1
for x in api.systems():
if x.kickstart is not None and x.kickstart != "" and x.kickstart != "<<inherit>>":
- files[x.kickstart] = 1
+ if os.path.exists(x.kickstart):
+ files[x.kickstart] = 1
for x in glob.glob("/var/lib/cobbler/kickstarts/*"):
files[x] = 1
for x in glob.glob("/etc/cobbler/*.ks"):