diff options
author | Chris Lumens <clumens@redhat.com> | 2004-12-21 19:58:49 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2004-12-21 19:58:49 +0000 |
commit | 25f1d1b8fcf7da72e2371c579ce032e1dc27a42f (patch) | |
tree | 545413c8df1a9546aff958731a822c1d8b084af4 /fsset.py | |
parent | a7951d05c98d7fee40848c39dabed6d878264bf1 (diff) | |
download | anaconda-25f1d1b8fcf7da72e2371c579ce032e1dc27a42f.tar.gz anaconda-25f1d1b8fcf7da72e2371c579ce032e1dc27a42f.tar.xz anaconda-25f1d1b8fcf7da72e2371c579ce032e1dc27a42f.zip |
Print a more descriptive error message if unable to mount the swap
partition (#143000).
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 33 |
1 files changed, 22 insertions, 11 deletions
@@ -1341,7 +1341,7 @@ MAILADDR root if label: entry.setLabel(label) - def turnOnSwap (self, chroot): + def turnOnSwap (self, chroot, upgrading=False): for entry in self.entries: if (entry.fsystem and entry.fsystem.getName() == "swap" and not entry.isMounted()): @@ -1350,16 +1350,27 @@ MAILADDR root self.mountcount = self.mountcount + 1 except SystemError, (num, msg): if self.messageWindow: - self.messageWindow(_("Error"), - _("Error enabling swap device %s: " - "%s\n\n" - "This most likely means this " - "swap partition has not been " - "initialized." - "\n\n" - "Press OK to reboot your " - "system.") - % (entry.device.getDevice(), msg)) + if upgrading: + self.messageWindow(_("Error"), + _("Error enabling swap device " + "%s: %s\n\n" + "The /etc/fstab on your " + "upgrade partition does not " + "reference a valid swap " + "partition.\n\n" + "Press OK to reboot your " + "system.") + % (entry.device.getDevice(), msg)) + else: + self.messageWindow(_("Error"), + _("Error enabling swap device " + "%s: %s\n\n" + "This most likely means this " + "swap partition has not been " + "initialized.\n\n" + "Press OK to reboot your " + "system.") + % (entry.device.getDevice(), msg)) sys.exit(0) def labelEntry(self, entry, chroot): |