| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 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 | 6 |
| 7 """Run the webpages_playback automation script.""" | 7 """Run the webpages_playback automation script.""" |
| 8 | 8 |
| 9 | 9 |
| 10 import os | 10 import os |
| 11 import posixpath | 11 import posixpath |
| 12 import sys | 12 import sys |
| 13 | 13 |
| 14 from build_step import BuildStep | 14 from build_step import BuildStep |
| 15 from utils import gs_utils | 15 from utils import gs_utils |
| 16 from utils import shell_utils | 16 from py.utils import shell_utils |
| 17 | 17 |
| 18 | 18 |
| 19 class SKPsCapture(BuildStep): | 19 class SKPsCapture(BuildStep): |
| 20 """BuildStep that captures the buildbot SKPs.""" | 20 """BuildStep that captures the buildbot SKPs.""" |
| 21 | 21 |
| 22 def __init__(self, timeout=10800, **kwargs): | 22 def __init__(self, timeout=10800, **kwargs): |
| 23 super(SKPsCapture, self).__init__(timeout=timeout, **kwargs) | 23 super(SKPsCapture, self).__init__(timeout=timeout, **kwargs) |
| 24 | 24 |
| 25 def _get_skp_version(self): | 25 def _get_skp_version(self): |
| 26 """Find an unused SKP version.""" | 26 """Find an unused SKP version.""" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ] | 76 ] |
| 77 try: | 77 try: |
| 78 shell_utils.run(cleanup_cmd) | 78 shell_utils.run(cleanup_cmd) |
| 79 except Exception: | 79 except Exception: |
| 80 # Do not fail the build step if the cleanup command fails. | 80 # Do not fail the build step if the cleanup command fails. |
| 81 pass | 81 pass |
| 82 | 82 |
| 83 | 83 |
| 84 if '__main__' == __name__: | 84 if '__main__' == __name__: |
| 85 sys.exit(BuildStep.RunBuildStep(SKPsCapture)) | 85 sys.exit(BuildStep.RunBuildStep(SKPsCapture)) |
| OLD | NEW |