flask-s3 icon indicating copy to clipboard operation
flask-s3 copied to clipboard

Changed create_all to try to get bucket first and create if one does not...

Open eprikazc opened this issue 11 years ago • 1 comments

Changed create_all to try to get bucket first and create if one does not exist

Motivation: conn.create_bucket call is throwing TooManyBuckets exception if the limit on number of buckets is reached. As a result, create_all fails with the error, even when bucket already exists. Example error msg:

<Error><Code>TooManyBuckets</Code><Message>You have attempted to create more buckets than allowed</Message><CurrentNumberOfBuckets>101</CurrentNumberOfBuckets><RequestId>28F97B871F391694</RequestId><HostId>tGKxl+TWdARLsieHOgZ+JHQ7fuzptOmzYe3diF8c8tmOeBoRRXqIRXOmpJEOhFHl3Gl31QUPtCc=</HostId><AllowedNumberOfBuckets>100</AllowedNumberOfBuckets></Error>

eprikazc avatar May 14 '14 11:05 eprikazc

See the discussion here on using recursive=True. Also, see if this fixes the problem when they exist.

eriktaubeneck avatar May 30 '14 04:05 eriktaubeneck