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

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

Issue 3016693002: Remove support for legacy wpr_server in Telemetry
Patch Set: Created 3 years, 3 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 | « telemetry/telemetry/testing/serially_executed_browser_test_case.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/wpr/archive_info.py
diff --git a/telemetry/telemetry/wpr/archive_info.py b/telemetry/telemetry/wpr/archive_info.py
index c36fdf02d63ce818b4d07805b8ee3a2c668498a8..df46a07b320bead0bdccd006d37ea21f0b200a9e 100644
--- a/telemetry/telemetry/wpr/archive_info.py
+++ b/telemetry/telemetry/wpr/archive_info.py
@@ -42,32 +42,7 @@ class WprArchiveInfo(object):
'Detected old version of archive info json file. Please update to new '
'version.')
- self.is_using_wpr_go_archives = True
self._story_name_to_wpr_file = data['archives']
- story_archives = self._data['archives']
- for story in story_archives:
- files = story_archives[story]
- for f in files:
- if files[f].endswith('.wpr'):
- self.is_using_wpr_go_archives = False
- self.ValidateArchivesFormat(story_archives)
-
- @staticmethod
- def ValidateArchivesFormat(story_archives):
- """ Checks that all archives follow either .wpr format or .wprgo format
- but not both.
- """
- using_wpr = False
- using_wpr_go = False
- for story in story_archives:
- files = story_archives[story]
- for f in files:
- if files[f].endswith('.wprgo'):
- using_wpr_go = True
- elif files[f].endswith('.wpr'):
- using_wpr = True
- assert not(using_wpr and using_wpr_go), (
- 'Detected both .wprgo or .wpr archive format.')
@classmethod
def FromFile(cls, file_path, bucket):
@@ -98,7 +73,7 @@ class WprArchiveInfo(object):
else:
assert isinstance(target_platforms, list), 'Must pass platforms as a list'
target_platforms = target_platforms + [_DEFAULT_PLATFORM]
- # Download all .wpr or .wprgo files.
+ # Download all .wprgo files.
if not self._bucket:
logging.warning('Story set in %s has no bucket specified, and '
'cannot be downloaded from cloud_storage.', )
@@ -216,7 +191,7 @@ class WprArchiveInfo(object):
highest_number = -1
base = None
wpr_files = []
- extension = 'wprgo' if self.is_using_wpr_go_archives else 'wpr'
+ extension = 'wprgo'
for story in self._data['archives']:
for p in self._data['archives'][story]:
wpr_files.append(self._data['archives'][story][p])
« no previous file with comments | « telemetry/telemetry/testing/serially_executed_browser_test_case.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698