summaryrefslogtreecommitdiffstats
path: root/harddrive.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-02-15 00:09:52 +0000
committerMike Fulbright <msf@redhat.com>2001-02-15 00:09:52 +0000
commit8310ad6e65d4f2e47f7fb12622923caf29c93ef5 (patch)
tree64c0a1e1f9f5422071c1252db57d7ac76942918d /harddrive.py
parent7731b27dbbef23a568860b2d60b464b06a13e264 (diff)
downloadanaconda-8310ad6e65d4f2e47f7fb12622923caf29c93ef5.tar.gz
anaconda-8310ad6e65d4f2e47f7fb12622923caf29c93ef5.tar.xz
anaconda-8310ad6e65d4f2e47f7fb12622923caf29c93ef5.zip
catch non 2048 multiple long ISOs, probably means that it was corrupted
Diffstat (limited to 'harddrive.py')
-rw-r--r--harddrive.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/harddrive.py b/harddrive.py
index 5c848264f..6de1d1f91 100644
--- a/harddrive.py
+++ b/harddrive.py
@@ -228,7 +228,22 @@ class HardDriveInstallMethod(InstallMethod):
for num in range(1, 10):
discTag = "/mnt/cdimage/.disc%d-%s" % (num, arch)
if os.access(discTag, os.R_OK):
- self.discImages[num] = file
+ import stat
+
+ # warn user if images appears to be wrong size
+ if os.stat(what)[stat.ST_SIZE] % 2048:
+ rc = messageWindow(_("Warning"),
+ "The ISO image %s has a size which is not "
+ "a multiple of 2048 bytes. This may mean "
+ "it was corrupted on transfer to this computer."
+ "\n\nPress OK to continue (but installation will "
+ "probably fail), or Cancel to exit the "
+ "installer (RECOMMENDED). " % file, type = "okcancel").getrc()
+ if rc:
+ import sys
+ sys.exit(0)
+
+ self.discImages[num] = file
isys.umount("/mnt/cdimage")
except SystemError: