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

Unified Diff: prebuilt.py

Issue 3667005: Update RemoteUpload to return a set Update if failed_uploads to check deeper (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils
Patch Set: Add parans around second part of if statement Created 10 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: prebuilt.py
diff --git a/prebuilt.py b/prebuilt.py
index 34be39cff17218568e186f329a8134a876e27d30..df7945235ca9da51c51631116a284dd68b91a7d7 100755
--- a/prebuilt.py
+++ b/prebuilt.py
@@ -212,7 +212,7 @@ def RemoteUpload(files, pool=10):
pool: integer of maximum proesses to have at the same time.
Returns:
- Return a list of tuple arguments of the failed uploads
+ Return a set of tuple arguments of the failed uploads
"""
# TODO(scottz) port this to use _RunManyParallel when it is available in
# cros_build_lib
@@ -224,7 +224,7 @@ def RemoteUpload(files, pool=10):
result = pool.map_async(_GsUpload, workers, chunksize=1)
while True:
try:
- return result.get(60*60)
+ return set(result.get(60*60))
except multiprocessing.TimeoutError:
pass
@@ -283,8 +283,9 @@ def UploadPrebuilt(build_path, bucket, board=None, git_file=None):
print 'Uploading %s' % package_string
failed_uploads = RemoteUpload(upload_files)
- if failed_uploads:
- raise UploadFailed('Error uploading:\n%s' % '\n'.join(failed_uploads))
+ if len(failed_uploads) > 1 or (None not in failed_uploads):
+ error_msg = ['%s -> %s\n' % args for args in failed_uploads]
+ raise UploadFailed('Error uploading:\n%s' % error_msg)
if git_file:
RevGitFile(git_file, package_string, version)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698