Tweak verbosity to hopefully better match intuitive expectations
This commit is contained in:
parent
912a9d0ad8
commit
933a1036ae
1 changed files with 2 additions and 2 deletions
|
@ -32,14 +32,14 @@ def get(url, path, verbose=False):
|
|||
try:
|
||||
download(sha_path, sha_url, verbose)
|
||||
if os.path.exists(path):
|
||||
if verify(path, sha_path, verbose):
|
||||
if verify(path, sha_path, False):
|
||||
print("using already-download file " + path)
|
||||
return
|
||||
else:
|
||||
print("ignoring already-download file " + path + " due to failed verification")
|
||||
os.unlink(path)
|
||||
download(temp_path, url, verbose)
|
||||
if not verify(temp_path, sha_path, verbose):
|
||||
if not verify(temp_path, sha_path, True):
|
||||
raise RuntimeError("failed verification")
|
||||
print("moving {} to {}".format(temp_path, path))
|
||||
shutil.move(temp_path, path)
|
||||
|
|
Loading…
Add table
Reference in a new issue