From 0e23dd6c55a722be1d36bd3c899f0ff9796f8e8d Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Fri, 24 Apr 2015 11:03:36 -0400 Subject: [PATCH] avoid exception when boto is not available --- cloud/amazon/s3.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud/amazon/s3.py b/cloud/amazon/s3.py index fe8aeaf0611..54288ad8723 100644 --- a/cloud/amazon/s3.py +++ b/cloud/amazon/s3.py @@ -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: