flask-s3
flask-s3 copied to clipboard
Changed create_all to try to get bucket first and create if one does not...
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>