summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-05-30 10:56:18 -0400
committerMichael DeHaan <mdehaan@redhat.com>2008-05-30 10:56:18 -0400
commita63789be503d43b6f4fa42794a18cfe9b8f2c586 (patch)
tree26281a376307d887d2670727d68d981ad30c8238
parent230efa2eba9f6578cfbc7c3905c8c0295518c3e5 (diff)
downloadthird_party-cobbler-a63789be503d43b6f4fa42794a18cfe9b8f2c586.tar.gz
third_party-cobbler-a63789be503d43b6f4fa42794a18cfe9b8f2c586.tar.xz
third_party-cobbler-a63789be503d43b6f4fa42794a18cfe9b8f2c586.zip
utils.get_kickstart_templates now returns only files, so that it will not encounter
problems if the directory is under version control.
-rw-r--r--CHANGELOG1
-rw-r--r--cobbler/utils.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 99e84cf..989bba7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -8,6 +8,7 @@ Cobbler CHANGELOG
- Fix misformatted warning in "check"
- Do not own tftpboot
- Default arches to 'i386' not 'x86' for consistency, esp. in import
+- When querying kickstart templates, do not return directories
- Wed May 27 2008 - 1.0.0
- Merge devel branch onto master, this is 1.0
diff --git a/cobbler/utils.py b/cobbler/utils.py
index de00150..8ddf6af 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -836,9 +836,11 @@ def get_kickstart_templates(api):
if os.path.exists(x.kickstart):
files[x.kickstart] = 1
for x in glob.glob("/var/lib/cobbler/kickstarts/*"):
- files[x] = 1
+ if os.path.isfile(x):
+ files[x] = 1
for x in glob.glob("/etc/cobbler/*.ks"):
- files[x] = 1
+ if os.path.isfile(x):
+ files[x] = 1
return files.keys()