diff options
author | Mike Fulbright <msf@redhat.com> | 2001-02-15 00:09:52 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-02-15 00:09:52 +0000 |
commit | 8310ad6e65d4f2e47f7fb12622923caf29c93ef5 (patch) | |
tree | 64c0a1e1f9f5422071c1252db57d7ac76942918d /harddrive.py | |
parent | 7731b27dbbef23a568860b2d60b464b06a13e264 (diff) | |
download | anaconda-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.py | 17 |
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: |