avoid exception when boto is not available
This commit is contained in:
parent
178d3ea133
commit
0e23dd6c55
1 changed files with 3 additions and 1 deletions
|
@ -153,7 +153,9 @@ def bucket_check(module, s3, bucket):
|
||||||
else:
|
else:
|
||||||
return False
|
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:
|
try:
|
||||||
bucket = s3.create_bucket(bucket, location=location)
|
bucket = s3.create_bucket(bucket, location=location)
|
||||||
except s3.provider.storage_response_error, e:
|
except s3.provider.storage_response_error, e:
|
||||||
|
|
Loading…
Reference in a new issue