diff options
author | Chris Lumens <clumens@redhat.com> | 2007-07-18 20:15:09 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-07-18 20:15:09 +0000 |
commit | dd4f6647d364678d8d0d60e168e3876ef172b84f (patch) | |
tree | 76a6bd0e75f79491ae5b192988ba9bb8a511ec28 /fsset.py | |
parent | c2c32c53faf9ccad3be094992cd2dcde202f9e5b (diff) | |
download | anaconda-dd4f6647d364678d8d0d60e168e3876ef172b84f.tar.gz anaconda-dd4f6647d364678d8d0d60e168e3876ef172b84f.tar.xz anaconda-dd4f6647d364678d8d0d60e168e3876ef172b84f.zip |
Improve error reporting when trying to mount swap partitions specified by
device name instead of label (#248558).
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 37 |
1 files changed, 17 insertions, 20 deletions
@@ -1536,27 +1536,24 @@ MAILADDR root sys.exit(0) except SystemError, (num, msg): if self.messageWindow: - 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 exit the " - "installer.") - % (entry.device.getDevice(), msg)) + if upgrading and not entry.getLabel(): + err = _("Error enabling swap device %s: %s\n\n" + "Devices in /etc/fstab should be specified " + "by label, not by device name.\n\nPress " + "OK to exit the installer.") % (entry.device.getDevice(), msg) + elif upgrading: + err = _("Error enabling swap device %s: %s\n\n" + "The /etc/fstab on your upgrade partition " + "does not reference a valid swap " + "partition.\n\nPress OK to exit the " + "installer") % (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 exit the " - "installer.") - % (entry.device.getDevice(), msg)) + err = _("Error enabling swap device %s: %s\n\n" + "This most likely means this swap " + "partition has not been initialized.\n\n" + "Press OK to exit the installer.") % (entry.device.getDevice(), msg) + + self.messageWindow(_("Error"), err) sys.exit(0) def labelEntry(self, entry, chroot): |