Commit ee72677f authored by prasadv's avatar prasadv Committed by Commit Bot

Add exception handling for missing archives.

Change-Id: Ic2443109057207e8c31f3747b92f3457cd68998c
Reviewed-on: https://chromium-review.googlesource.com/956701Reviewed-by: default avatarMichael Moss <mmoss@chromium.org>
Commit-Queue: Prasad Vuppalapu <prasadv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542158}
parent 4c135b3c
......@@ -247,8 +247,13 @@ def upload_build(zip_file, context):
def download_revision_map(context):
"""Downloads the revision map in original_gs_url in context."""
download_file = '%s/%s' % (context.repackage_remote_path, REVISION_MAP_FILE)
cloud_storage.Get(context.repackage_gs_bucket, download_file,
context.revision_file)
try:
cloud_storage.Get(context.original_gs_bucket,
remote_file_path, zip_file_name)
except Exception, e:
logging.warning('Failed to download: %s, error: %s', zip_file_name, e)
return False
return True
def get_revision_map(context):
......@@ -350,7 +355,8 @@ def repackage_single_revision(revision_map, verify_run, staging_dir,
archive_name = '%s_%s' %(context.file_prefix, cp_num)
file_archive = os.path.join(staging_dir, archive_name)
zip_file_name = '%s.zip' % (file_archive)
download_build(cp_num, revision_map, zip_file_name, context)
if not download_build(cp_num, revision_map, zip_file_name, context):
return
extract_dir = os.path.join(staging_dir, archive_name)
is_android = context.archive in ['arm', 'arm64']
......
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