Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: download_from_google_storage.py

Issue 1252313005: Add verification to downloaded files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/download_from_google_storage_unittests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_from_google_storage.py
diff --git a/download_from_google_storage.py b/download_from_google_storage.py
index a45f387ce2aeb3a2d9f8f820206ff8e597eb1e5c..a05287619fa4de61a747ba320e988f7dbd709ed6 100755
--- a/download_from_google_storage.py
+++ b/download_from_google_storage.py
@@ -227,6 +227,13 @@ def _downloader_worker_thread(thread_num, q, force, base_url,
if code != 0:
out_q.put('%d> %s' % (thread_num, err))
ret_codes.put((code, err))
Vadim Sh. 2015/07/29 20:43:49 is it ok that there's no "continue" after this lin
Ryan Tseng 2015/07/29 20:51:24 Good catch there should be a continue here. I thi
+ remote_sha1 = get_sha1(output_filename)
+ if remote_sha1 != input_sha1_sum:
+ msg = ('%d> ERROR remote sha1 (%s) does not match expected sha1 (%s).' %
+ (thread_num, remote_sha1, input_sha1_sum))
+ out_q.put(msg)
+ ret_codes.put((20, msg))
+ continue
# Set executable bit.
if sys.platform == 'cygwin':
« no previous file with comments | « no previous file | tests/download_from_google_storage_unittests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698