[PATCH 3/3] Clean up BootLoader.writeKS to account for no bootloader.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/bootloader.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 1150335..b08c6cd 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -988,20 +988,20 @@ class BootLoader(object):
 
     def writeKS(self, f):
         """ Write bootloader section of kickstart configuration. """
-        if self.stage1_device.isDisk:
+        if not self.stage1_device:
+            location = "none\n"
+        elif self.stage1_device.isDisk:
             location = "mbr"
-        elif self.stage1_device:
-            location = "partition"
         else:
-            location = "none\n"
+            location = "partition"
 
         f.write("bootloader --location=%s" % location)
-        if self.timeout is not None:
-            f.write(" --timeout=%d" % self.timeout)
-
         if not self.stage1_device:
             return
 
+        if self.timeout is not None:
+            f.write(" --timeout=%d" % self.timeout)
+
         if self.drive_order:
             f.write(" --driveorder=%s" % ",".join(self.drive_order))
 
-- 
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux