mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Tweak verbosity to hopefully better match intuitive expectations
This commit is contained in:
parent
912a9d0ad8
commit
933a1036ae
@ -32,14 +32,14 @@ def get(url, path, verbose=False):
|
|||||||
try:
|
try:
|
||||||
download(sha_path, sha_url, verbose)
|
download(sha_path, sha_url, verbose)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
if verify(path, sha_path, verbose):
|
if verify(path, sha_path, False):
|
||||||
print("using already-download file " + path)
|
print("using already-download file " + path)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
print("ignoring already-download file " + path + " due to failed verification")
|
print("ignoring already-download file " + path + " due to failed verification")
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
download(temp_path, url, verbose)
|
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")
|
raise RuntimeError("failed verification")
|
||||||
print("moving {} to {}".format(temp_path, path))
|
print("moving {} to {}".format(temp_path, path))
|
||||||
shutil.move(temp_path, path)
|
shutil.move(temp_path, path)
|
||||||
|
Loading…
Reference in New Issue
Block a user