makebuildserver: avoid trying to continue cache downloads when checksum is okay

This commit is contained in:
Michael Pöhn 2019-01-28 22:16:48 +01:00
parent 4cbe1d1222
commit 8c025b91d8

View file

@ -423,6 +423,9 @@ def update_cache(cachedir, cachefiles):
local_filename = os.path.join(cachedir, filename) local_filename = os.path.join(cachedir, filename)
if os.path.exists(local_filename): if os.path.exists(local_filename):
if sha256_for_file(local_filename) == shasum:
logger.info("\t...shasum verified for %s", local_filename)
continue
local_length = os.path.getsize(local_filename) local_length = os.path.getsize(local_filename)
else: else:
local_length = -1 local_length = -1