diff options
author | aiolos <aiolos@chromium.org> | 2015-04-25 18:00:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-26 01:00:46 +0000 |
commit | be75629c7140866cccc375d09a198a7a843988cf (patch) | |
tree | 97f959d72774bfca2e84ca615740384e6afce47b /tools | |
parent | 0ca264b8e9dc7f0713cb78c7ff75099749b4806f (diff) | |
download | chromium_src-be75629c7140866cccc375d09a198a7a843988cf.zip chromium_src-be75629c7140866cccc375d09a198a7a843988cf.tar.gz chromium_src-be75629c7140866cccc375d09a198a7a843988cf.tar.bz2 |
Upload to the hash location instead of the file_name on record_wpr upload.
BUG=
Review URL: https://codereview.chromium.org/1067583004
Cr-Commit-Position: refs/heads/master@{#326982}
Diffstat (limited to 'tools')
-rw-r--r-- | tools/telemetry/telemetry/wpr/archive_info.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/telemetry/telemetry/wpr/archive_info.py b/tools/telemetry/telemetry/wpr/archive_info.py index e90ae5e..3468ed1 100644 --- a/tools/telemetry/telemetry/wpr/archive_info.py +++ b/tools/telemetry/telemetry/wpr/archive_info.py @@ -127,8 +127,9 @@ class WprArchiveInfo(object): shutil.move(self.temp_target_wpr_file_path, target_wpr_file_path) # Update the hash file. + target_wpr_file_hash = cloud_storage.CalculateHash(target_wpr_file_path) with open(target_wpr_file_path + '.sha1', 'wb') as f: - f.write(cloud_storage.CalculateHash(target_wpr_file_path)) + f.write(target_wpr_file_hash) f.flush() self._WriteToFile() @@ -141,7 +142,7 @@ class WprArchiveInfo(object): 'user stories to cloud storage.') return try: - cloud_storage.Insert(self._bucket, target_wpr_file, + cloud_storage.Insert(self._bucket, target_wpr_file_hash, target_wpr_file_path) except cloud_storage.CloudStorageError, e: logging.warning('Failed to upload wpr file %s to cloud storage. ' |