Commit 29846e0a authored by ariblue's avatar ariblue Committed by Commit bot

Raise an exception when the wpr_archive_info isn't created.

This is to provide a more user friendly error. This:

  AssertionError: Pageset archive_data_file path must be specified.

instead of this:

  AttributeError: 'NoneType' object has no attribute 'AddNewTemporaryRecording'

BUG=

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

Cr-Commit-Position: refs/heads/master@{#300050}
parent 5455db15
...@@ -172,6 +172,8 @@ class WprRecorder(object): ...@@ -172,6 +172,8 @@ class WprRecorder(object):
return ps return ps
def Record(self, results): def Record(self, results):
assert self._page_set.wpr_archive_info, (
'Pageset archive_data_file path must be specified.')
self._page_set.wpr_archive_info.AddNewTemporaryRecording() self._page_set.wpr_archive_info.AddNewTemporaryRecording()
self._record_page_test.CustomizeBrowserOptions(self._options) self._record_page_test.CustomizeBrowserOptions(self._options)
page_runner.Run(self._record_page_test, self._page_set, page_runner.Run(self._record_page_test, self._page_set,
......
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