Commit 3c03a29a authored by adamk@chromium.org's avatar adamk@chromium.org

Fix cloud storage upload messages in page_sets/PRESUBMIT.py

The public/internal prompt had an unexpanded "%s" replacement.

Also, messages about what was being uploaded referred to the
sha1 file, while the thing actually being uploaded is the .wpr.

R=dtu@chromium.org

Review URL: https://codereview.chromium.org/126543006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243645 0039d316-1c4b-4281-b951-d872f2087c98
parent 1fd5569c
...@@ -80,8 +80,9 @@ def _SyncFilesToCloud(input_api, output_api): ...@@ -80,8 +80,9 @@ def _SyncFilesToCloud(input_api, output_api):
continue continue
try: try:
bucket_input = raw_input('Uploading to Cloud Storage: %s\nIs this file ' bucket_input = raw_input('Uploading to Cloud Storage: %s\n'
'[p]ublic or Google-[i]nternal?').lower() 'Is this file [p]ublic or Google-[i]nternal?'
% file_path).lower()
if 'public'.startswith(bucket_input): if 'public'.startswith(bucket_input):
bucket = cloud_storage.PUBLIC_BUCKET bucket = cloud_storage.PUBLIC_BUCKET
elif ('internal'.startswith(bucket_input) or elif ('internal'.startswith(bucket_input) or
...@@ -94,10 +95,10 @@ def _SyncFilesToCloud(input_api, output_api): ...@@ -94,10 +95,10 @@ def _SyncFilesToCloud(input_api, output_api):
cloud_storage.Insert(bucket, file_hash, file_path) cloud_storage.Insert(bucket, file_hash, file_path)
results.append(output_api.PresubmitNotifyResult( results.append(output_api.PresubmitNotifyResult(
'Uploaded file to Cloud Storage: %s' % hash_path)) 'Uploaded file to Cloud Storage: %s' % file_path))
except cloud_storage.CloudStorageError, e: except cloud_storage.CloudStorageError, e:
results.append(output_api.PresubmitError( results.append(output_api.PresubmitError(
'Unable to upload to Cloud Storage: %s\n\n%s' % (hash_path, e))) 'Unable to upload to Cloud Storage: %s\n\n%s' % (file_path, e)))
return results return results
......
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