summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fsset.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/fsset.py b/fsset.py
index ded060f8c..aa250d503 100644
--- a/fsset.py
+++ b/fsset.py
@@ -581,7 +581,13 @@ class FileSystemSet:
# if an active partition is set, leave it alone; if none set
# set either our boot partition or the first partition on the drive active
def setActive(self, diskset):
- bootDev = self.bootloaderChoices(diskset)[1][0]
+ choices = self.bootloaderChoices(diskset)
+ if not choices:
+ bootDev = None
+ elif len(choices) == 1:
+ bootDev = self.bootloaderChoices(diskset)[0][0]
+ else:
+ bootDev = self.bootloaderChoices(diskset)[1][0]
for drive in diskset.disks.keys():
foundActive = 0