INFRA-1594 - I stupidly locked the boto3 version to the needed botocore version :-/ Fixed and added a separate check for botocore

This commit is contained in:
Tom Williams 2016-06-05 14:50:28 -04:00
parent 4aab4fa10b
commit e8bf0986a8

View File

@ -55,6 +55,7 @@ try:
import boto3
import boto.exception
import boto3.session
import botocore
# pylint: enable=import-error
logging.getLogger('boto3').setLevel(logging.CRITICAL)
@ -74,15 +75,18 @@ def __virtual__():
'''
# TODO: Determine minimal version we want to support. VPC requires > 2.8.0.
required_boto_version = '2.0.0'
# boto_s3_bucket module requires boto3 1.3.23 for idempotent ACL operations
# via the fix in https://github.com/boto/boto3/issues/390
required_boto3_version = '1.3.23'
# boto_s3_bucket module requires boto3 1.2.6 and botocore 1.3.23 for
# idempotent ACL operations via the fix in https://github.com/boto/boto3/issues/390
required_boto3_version = '1.2.6'
required_botocore_version = '1.3.23'
if not HAS_BOTO:
return False
elif _LooseVersion(boto.__version__) < _LooseVersion(required_boto_version):
return False
elif _LooseVersion(boto3.__version__) < _LooseVersion(required_boto3_version):
return False
elif _LooseVersion(botocore.__version__) < _LooseVersion(required_botocore_version):
return False
else:
return True