summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-08-20 10:37:05 -0400
committerChris Lumens <clumens@redhat.com>2008-08-20 12:55:55 -0400
commit391d3beff82061da085dee61957138d631ce836f (patch)
tree61dfc518a55e9041a781a1e5bb245a6ec04db6e7 /image.py
parent18c6c6fb888e9fa509f1f8b2db2b5db236d7bcd6 (diff)
downloadanaconda-391d3beff82061da085dee61957138d631ce836f.tar.gz
anaconda-391d3beff82061da085dee61957138d631ce836f.tar.xz
anaconda-391d3beff82061da085dee61957138d631ce836f.zip
Allow retrying if the ISO images aren't found (for the USB case).
Diffstat (limited to 'image.py')
-rw-r--r--image.py38
1 files changed, 22 insertions, 16 deletions
diff --git a/image.py b/image.py
index 073733f17..18d99383d 100644
--- a/image.py
+++ b/image.py
@@ -147,20 +147,26 @@ def mountDirectory(methodstr, messageWindow):
if os.path.ismount("/mnt/isodir"):
return
- try:
- isys.mount(device, "/mnt/isodir", fstype = fstype)
- except SystemError, msg:
- log.error("couldn't mount ISO source directory: %s" % msg)
- messageWindow(_("Couldn't Mount ISO Source"),
- _("An error occurred mounting the source "
- "device %s. This may happen if your ISO "
- "images are located on an advanced storage "
- "device like LVM or RAID, or if there was a "
- "problem mounting a partition. Click exit "
- "to abort the installation.")
- % (device,), type="custom", custom_icon="error",
- custom_buttons=[_("_Exit")])
- sys.exit(0)
+ while True:
+ try:
+ isys.mount(device, "/mnt/isodir", fstype = fstype)
+ break
+ except SystemError, msg:
+ log.error("couldn't mount ISO source directory: %s" % msg)
+ ans = messageWindow(_("Couldn't Mount ISO Source"),
+ _("An error occurred mounting the source "
+ "device %s. This may happen if your ISO "
+ "images are located on an advanced storage "
+ "device like LVM or RAID, or if there was a "
+ "problem mounting a partition. Click exit "
+ "to abort the installation.")
+ % (device,), type="custom", custom_icon="error",
+ custom_buttons=[_("_Exit"), _("_Retry")])
+
+ if ans == 0:
+ sys.exit(0)
+ else:
+ continue
def mountImage(isodir, tree, discnum, messageWindow, discImages={}):
if os.path.ismount(tree):
@@ -181,8 +187,8 @@ def mountImage(isodir, tree, discnum, messageWindow, discImages={}):
"image #%s, but cannot find it on "
"the hard drive.\n\n"
"Please copy this image to the "
- "drive and click Retry. Click Exit "
- " to abort the installation.")
+ "drive and click Retry. Click Exit "
+ "to abort the installation.")
% (discnum,), type="custom",
custom_icon="warning",
custom_buttons=[_("_Exit"), _("_Retry")])