summaryrefslogtreecommitdiffstats
path: root/cobbler
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 /cobbler
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.
Diffstat (limited to 'cobbler')
-rw-r--r--cobbler/utils.py6
1 files changed, 4 insertions, 2 deletions
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()