diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2006-10-23 14:07:02 -0400 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-10-23 14:07:02 -0400 |
commit | 67d49c2f21c8348a3b431b9d7e1cb2d5828f15c6 (patch) | |
tree | 30039ae27654d6f941eec264f27c98b217903bcb | |
parent | 978bac33d87fc1ab21f497e0ff50f7d3da6a16be (diff) | |
download | cobbler-67d49c2f21c8348a3b431b9d7e1cb2d5828f15c6.tar.gz cobbler-67d49c2f21c8348a3b431b9d7e1cb2d5828f15c6.tar.xz cobbler-67d49c2f21c8348a3b431b9d7e1cb2d5828f15c6.zip |
Make koan work when no kickstart is set
-rw-r--r-- | CHANGELOG | 1 | ||||
-rwxr-xr-x | koan/app.py | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -8,6 +8,7 @@ wasn't consistant for 0.1.X builds, though it will be in the future. - "koan --xen" now takes an optional "--interactive". By default it won't launch an xm console. For debugging kickstarts, pass in the "--interactive" flag (aliased to "-i"). +- koan now works when no kickstart is assigned to the cobbler profile * Wed Oct 11 2006 Michael DeHaan <mdehaan@redhat.com> - 0.2.2-1 - Bundled subprocess to allow it's use under python 2.3 (RHEL4, etc) diff --git a/koan/app.py b/koan/app.py index 58d6de4f..4a36b84a 100755 --- a/koan/app.py +++ b/koan/app.py @@ -317,6 +317,8 @@ class Koan: """ Get contents of data in network kickstart file. """ + if kickstart is None or kickstart == "": + return None if kickstart.startswith("nfs"): ndir = os.path.dirname(kickstart[6:]) nfile = os.path.basename(kickstart[6:]) @@ -376,8 +378,10 @@ class Koan: """ # save kickstart to file + ksdata = self.get_kickstart_data(kickstart) fd = open("/var/spool/koan/ks.cfg","w+") - fd.write(self.get_kickstart_data(kickstart)) + if ksdata is not None: + fd.write(ksdata) fd.close() # handle insertion of kickstart based on type of initrd |