OLD | NEW |
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 import logging | 5 import logging |
6 import os | 6 import os |
7 import sys | 7 import sys |
8 import tempfile | 8 import tempfile |
9 import time | 9 import time |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 [skipped['page'].url for skipped in results.skipped_pages])) | 108 [skipped['page'].url for skipped in results.skipped_pages])) |
109 | 109 |
110 if results.page_successes: | 110 if results.page_successes: |
111 # Update the metadata for the pages which were recorded. | 111 # Update the metadata for the pages which were recorded. |
112 ps.wpr_archive_info.AddRecordedPages( | 112 ps.wpr_archive_info.AddRecordedPages( |
113 [page['page'] for page in results.page_successes]) | 113 [page['page'] for page in results.page_successes]) |
114 else: | 114 else: |
115 os.remove(temp_target_wpr_file_path) | 115 os.remove(temp_target_wpr_file_path) |
116 | 116 |
117 return min(255, len(results.page_failures)) | 117 return min(255, len(results.page_failures)) |
OLD | NEW |