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

Side by Side Diff: tools/skp/webpages_playback.py

Issue 2423093002: RecreateSKPs: Fix GoogleStorageDataStore.delete_path (Closed)
Patch Set: Fix Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Archives or replays webpages and creates SKPs in a Google Storage location. 6 """Archives or replays webpages and creates SKPs in a Google Storage location.
7 7
8 To archive webpages and store SKP files (archives should be rarely updated): 8 To archive webpages and store SKP files (archives should be rarely updated):
9 9
10 cd skia 10 cd skia
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 try: 478 try:
479 output = subprocess.check_output([ 479 output = subprocess.check_output([
480 'gsutil', 'ls', '/'.join((self._url, name))]) 480 'gsutil', 'ls', '/'.join((self._url, name))])
481 except subprocess.CalledProcessError: 481 except subprocess.CalledProcessError:
482 return False 482 return False
483 if len(output.splitlines()) != 1: 483 if len(output.splitlines()) != 1:
484 return False 484 return False
485 return True 485 return True
486 486
487 def delete_path(self, path): 487 def delete_path(self, path):
488 subprocess.check_call(['gsutil', 'rm', '-r', path]) 488 subprocess.check_call(['gsutil', 'rm', '-r', '/'.join((self._url, path))])
489 489
490 def download_file(self, name, local_path): 490 def download_file(self, name, local_path):
491 subprocess.check_call([ 491 subprocess.check_call([
492 'gsutil', 'cp', '/'.join((self._url, name)), local_path]) 492 'gsutil', 'cp', '/'.join((self._url, name)), local_path])
493 493
494 def upload_dir_contents(self, source_dir, dest_dir): 494 def upload_dir_contents(self, source_dir, dest_dir):
495 subprocess.check_call([ 495 subprocess.check_call([
496 'gsutil', 'cp', '-r', source_dir, '/'.join(self._url, dest_dir)]) 496 'gsutil', 'cp', '-r', source_dir, '/'.join(self._url, dest_dir)])
497 497
498 498
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 '--skia_tools is specified then the debugger is not run.', 585 '--skia_tools is specified then the debugger is not run.',
586 default=False) 586 default=False)
587 option_parser.add_option( 587 option_parser.add_option(
588 '', '--skp_prefix', 588 '', '--skp_prefix',
589 help='Prefix to add to the names of generated SKPs.', 589 help='Prefix to add to the names of generated SKPs.',
590 default=None) 590 default=None)
591 options, unused_args = option_parser.parse_args() 591 options, unused_args = option_parser.parse_args()
592 592
593 playback = SkPicturePlayback(options) 593 playback = SkPicturePlayback(options)
594 sys.exit(playback.Run()) 594 sys.exit(playback.Run())
OLDNEW
« 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