From: Alex Morega Date: Sun, 7 Jul 2013 21:41:23 +0000 (+0200) Subject: exception when checksum does not match X-Git-Tag: 1.0~58^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfff31c729ac23f59aae213e481ce31997cec91f;p=thirdparty%2Fbabel.git exception when checksum does not match --- diff --git a/scripts/download_import_cldr.py b/scripts/download_import_cldr.py index 68e64344..3ee1af99 100755 --- a/scripts/download_import_cldr.py +++ b/scripts/download_import_cldr.py @@ -60,7 +60,12 @@ def is_good_file(filename): if not blk: break h.update(blk) - return h.hexdigest() == FILESUM + digest = h.hexdigest() + if digest != FILESUM: + raise RuntimeError('Checksum mismatch: %r != %r' + % (digest, FILESUM)) + else: + return True def main():