From 59f2222ef70b67eeaa20b40175749bb17f32d987 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 10 Jan 2017 15:30:37 +0100 Subject: [PATCH] Do not remove the file and fail if there is no sha256 specified. This allow us to change the dependency version to change and make the checksum latter. --- kiwix-build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kiwix-build.py b/kiwix-build.py index 961042c..7e5e56b 100755 --- a/kiwix-build.py +++ b/kiwix-build.py @@ -192,7 +192,9 @@ class BuildEnv: raise SkipCommand() os.remove(file_path) urllib.request.urlretrieve(file_url, file_path) - if what.sha256 != get_sha256(file_path): + if not what.sha256: + print('Sha256 for {} not set, do no verify download'.format(what.name)) + elif what.sha256 != get_sha256(file_path): os.remove(file_path) raise StopBuild()