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

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



---
 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


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