Commit 53134e31 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Fix the --quiet flag of download_from_google_storage.py

Change download_from_google_storage.py to not write information
for successful actions when passed the --quiet flag.

Bug: none
Change-Id: I639df538935727150e540c72681fc1d4ccc88ec5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1944168
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: 's avatarMarc-Antoine Ruel <maruel@chromium.org>
parent 7c62ed63
......@@ -240,7 +240,7 @@ def _validate_tar_file(tar, prefix):
return all(map(_validate, tar.getmembers()))
def _downloader_worker_thread(thread_num, q, force, base_url,
gsutil, out_q, ret_codes, _verbose, extract,
gsutil, out_q, ret_codes, verbose, extract,
delete=True):
while True:
input_sha1_sum, output_filename = q.get()
......@@ -275,7 +275,8 @@ def _downloader_worker_thread(thread_num, q, force, base_url,
(file_url, output_filename, err)))
continue
# Fetch the file.
out_q.put('%d> Downloading %s...' % (thread_num, output_filename))
if verbose:
out_q.put('%d> Downloading %s...' % (thread_num, output_filename))
try:
if delete:
os.remove(output_filename) # Delete the file if it exists already.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment