fix a bug bug with VERIFY MD5 CHECKSUMS

Datas should be opened with option 'rb' otherwise it will cause a decode problem.
This commit is contained in:
William Lyu 2015-02-25 10:10:34 +08:00
parent 006b2558f0
commit a8e2cd3ddd

View file

@ -79,7 +79,7 @@ for f in files:
print('Verifying MD5 checksums...')
for f, checksum in zip(files, checksums):
downloadsum = hashlib.md5(open(f, 'r').read()).hexdigest()
downloadsum = hashlib.md5(open(f, 'rb').read()).hexdigest()
if downloadsum != checksum:
raise IOError("MD5 checksum for {} does not match. If this is your first "
"time receiving this message, please re-run the script. "