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

Unified Diff: tools/skp/webpages_playback.py

Issue 1033223005: webpages_playback.py: Avoid crash when retrying to capture skp (Closed) Base URL: https://skia.googlesource.com/skia.git@webpages-replay-filesystem
Patch Set: Created 5 years, 9 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/skp/webpages_playback.py
diff --git a/tools/skp/webpages_playback.py b/tools/skp/webpages_playback.py
index 7c2d75d7e7612946f8cd5ff3e1460aab4c215cc0..a3bff696da3c7d1bd3f8ad099f561d9543d8f115 100644
--- a/tools/skp/webpages_playback.py
+++ b/tools/skp/webpages_playback.py
@@ -233,6 +233,17 @@ class SkPicturePlayback(object):
for _ in range(RETRY_RECORD_WPR_COUNT):
try:
shell_utils.run(' '.join(record_wpr_cmd), shell=True)
+
+ # Move over the created archive into the local webpages archive
+ # directory.
+ shutil.move(
+ os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, wpr_data_file),
+ self._local_record_webpages_archive_dir)
+ shutil.move(
+ os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR,
+ page_set_json_name),
+ self._local_record_webpages_archive_dir)
+
# Break out of the retry loop since there were no errors.
break
except Exception:
@@ -271,17 +282,6 @@ class SkPicturePlayback(object):
# captured SKP is still valid. This is a known issue.
pass
- if self._record:
- # Move over the created archive into the local webpages archive
- # directory.
- shutil.move(
- os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR, wpr_data_file),
- self._local_record_webpages_archive_dir)
- shutil.move(
- os.path.join(LOCAL_REPLAY_WEBPAGES_ARCHIVE_DIR,
- page_set_json_name),
- self._local_record_webpages_archive_dir)
-
# Rename generated SKP files into more descriptive names.
try:
self._RenameSkpFiles(page_set)
« 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