Chromium Code Reviews| Index: download_from_google_storage.py |
| diff --git a/download_from_google_storage.py b/download_from_google_storage.py |
| index 8370515e6a15879c3ddf5c1e8693efeb595a8ccd..cd284597f380841ace00c678562d0c5316c7e6f1 100755 |
| --- a/download_from_google_storage.py |
| +++ b/download_from_google_storage.py |
| @@ -236,8 +236,11 @@ def _downloader_worker_thread(thread_num, q, force, base_url, |
| file_url, output_filename))) |
| continue |
| # Fetch the file. |
| - out_q.put('%d> Downloading %s...' % ( |
| - thread_num, output_filename)) |
| + out_q.put('%d> Downloading %s...' % (thread_num, output_filename)) |
| + try: |
| + os.remove(output_filename) # Delete the file if it exists already. |
| + except OSError: |
| + pass |
|
pgervais
2014/10/31 22:25:08
Please print an error message if the file still ex
hinoka
2014/10/31 22:37:00
Done.
|
| code, _, err = gsutil.check_call('cp', '-q', file_url, output_filename) |
| if code != 0: |
| out_q.put('%d> %s' % (thread_num, err)) |