summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-11-15 16:25:09 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-11-15 16:25:09 -0500
commit5cc6b59cefc2cb9375f9dbbe00740d1dca3a4d7c (patch)
tree7c3b6a3da492077a7a3d0e98a98ada1134cc7596
parent9fc9534aa2d7fe2a3b7d451fd3cdda067a489db9 (diff)
(a) modify tests to be tolerant of existing directory, (b) modify input engine to know that <<inherit>>
is never going to be a string key, so be sure to not include it in things like kickstart arguments.
-rw-r--r--cobbler/utils.py4
-rw-r--r--tests/tests.py5
2 files changed, 8 insertions, 1 deletions
diff --git a/cobbler/utils.py b/cobbler/utils.py
index db55128..d0f765a 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -237,6 +237,10 @@ def input_string_or_hash(options,delim=","):
Newer versions of cobbler allow dictionaries. This function is used to allow loading
of older value formats so new users of cobbler aren't broken in an upgrade.
"""
+
+ if options == "<<inherit>>":
+ options = {}
+
if options is None:
return (True, {})
elif type(options) == list:
diff --git a/tests/tests.py b/tests/tests.py
index 8f98733..f81d508 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -49,7 +49,10 @@ class BootTest(unittest.TestCase):
# Create temp dir
self.topdir = "/tmp/cobbler_test"
- os.makedirs(self.topdir)
+ try:
+ os.makedirs(self.topdir)
+ except:
+ pass
self.fk_initrd = os.path.join(self.topdir, FAKE_INITRD)
self.fk_initrd2 = os.path.join(self.topdir, FAKE_INITRD2)