diff options
author | Chris Lumens <clumens@redhat.com> | 2007-03-26 19:47:46 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-03-26 19:47:46 +0000 |
commit | bea724692153f283d677ed759422e6a3b81c236b (patch) | |
tree | c9e620a3bc84d320f4982bc480690c6fe7721c1e /fsset.py | |
parent | ea09c4c2f3ab9efb4d3a4fffee2025c44e0b567f (diff) | |
download | anaconda-bea724692153f283d677ed759422e6a3b81c236b.tar.gz anaconda-bea724692153f283d677ed759422e6a3b81c236b.tar.xz anaconda-bea724692153f283d677ed759422e6a3b81c236b.zip |
Catch errors on unprintable labels and tell the user what device is causing
problems (#191679).
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -2445,15 +2445,24 @@ def readFstab (anaconda): if not labelToDevice.has_key(label): labelToDevice[label] = device elif intf is not None: - intf.messageWindow(_("Duplicate Labels"), - _("Multiple devices on your system are " - "labelled %s. Labels across devices must be " - "unique for your system to function " - "properly.\n\n" - "Please fix this problem and restart the " - "installation process.") %(label,), - type="custom", custom_icon="error", - custom_buttons=[_("_Reboot")]) + try: + intf.messageWindow(_("Duplicate Labels"), + _("Multiple devices on your system are " + "labelled %s. Labels across devices must be " + "unique for your system to function " + "properly.\n\n" + "Please fix this problem and restart the " + "installation process.") %(label,), + type="custom", custom_icon="error", + custom_buttons=[_("_Reboot")]) + except TypeError: + intf.messageWindow(_("Invalid Label"), + _("An invalid label was found on device " + "%s. Please fix this problem and restart " + "the installation process.") %(device,), + type="custom", custom_icon="error", + custom_buttons=[_("_Reboot")]) + sys.exit(0) else: log.warning("Duplicate labels for %s, but no intf so trying " |