MCPcopy Create free account
hub / github.com/wal-e/wal-e / insistent_bucket_create

Function insistent_bucket_create

tests/s3_integration_help.py:185–197  ·  view source on GitHub ↗
(conn, bucket_name, *args, **kwargs)

Source from the content-addressed store, hash-verified

183
184
185def insistent_bucket_create(conn, bucket_name, *args, **kwargs):
186 while True:
187 try:
188 bucket = conn.create_bucket(bucket_name, *args, **kwargs)
189 except boto.exception.S3CreateError as e:
190 if e.status == 409:
191 # Conflict; bucket already created -- probably means
192 # the prior delete did not process just yet.
193 continue
194
195 raise
196
197 return bucket
198
199
200class FreshBucket(object):

Callers 1

createMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected