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

Unified Diff: tools/telemetry/telemetry/wpr/archive_info.py

Issue 1067583004: Upload to the hash location instead of the file_name on record_wpr upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: tools/telemetry/telemetry/wpr/archive_info.py
diff --git a/tools/telemetry/telemetry/wpr/archive_info.py b/tools/telemetry/telemetry/wpr/archive_info.py
index e90ae5e834a4d3390436de55e5fc8cd6ce462267..3468ed1e775f7808cb0018b6e95f4bb6332b9cd1 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. '
« 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