Merge pull request #1196 from bcoca/s3_exception_fix

avoid exception when boto is not available
This commit is contained in:
Brian Coca 2015-04-27 12:28:47 -04:00
commit 9ee68f789e

View file

@ -153,7 +153,9 @@ def bucket_check(module, s3, bucket):
else:
return False
def create_bucket(module, s3, bucket, location=Location.DEFAULT):
def create_bucket(module, s3, bucket, location=None):
if location is None:
location = Location.DEFAULT
try:
bucket = s3.create_bucket(bucket, location=location)
except s3.provider.storage_response_error, e: