summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-03-26 19:47:46 +0000
committerChris Lumens <clumens@redhat.com>2007-03-26 19:47:46 +0000
commitbea724692153f283d677ed759422e6a3b81c236b (patch)
treec9e620a3bc84d320f4982bc480690c6fe7721c1e /fsset.py
parentea09c4c2f3ab9efb4d3a4fffee2025c44e0b567f (diff)
downloadanaconda-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.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/fsset.py b/fsset.py
index b37074757..b5948d3ca 100644
--- a/fsset.py
+++ b/fsset.py
@@ -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 "