Skip to content
Snippets Groups Projects
Commit 3c28d678 authored by dlott's avatar dlott Committed by darabearr
Browse files

Ignore BucketNotFoundException when deleting buckets.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=291761072
parent 3bdccfff
Branches
No related tags found
1 merge request!17Commits pulled github 171018083
......@@ -95,9 +95,13 @@ class GoogleCloudStorageService(object_storage_service.ObjectStorageService):
# them all.
self.EmptyBucket(bucket)
vm_util.IssueCommand(
['gsutil', 'rb',
'gs://%s' % bucket])
def _bucket_not_found(stdout, stderr, retcode):
del stdout # unused
return retcode and 'BucketNotFoundException' in stderr
vm_util.IssueCommand(['gsutil', 'rb', 'gs://%s' % bucket],
suppress_failure=_bucket_not_found)
def EmptyBucket(self, bucket):
# Ignore failures here and retry in DeleteBucket. See more comments there.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment