Merge pull request #3161 from somechris/fix-boto-version-requirement

Guard against too old boto library
This commit is contained in:
René Moser 2016-03-30 07:23:52 +02:00
commit fa8cb762ed

View file

@ -263,10 +263,12 @@ EXAMPLES = '''
'''
MINIMUM_BOTO_VERSION = '2.28.0'
WAIT_RETRY_SLEEP = 5 # how many seconds to wait between propagation status polls
import time
import distutils.version
try:
import boto
@ -381,6 +383,9 @@ def main():
if not HAS_BOTO:
module.fail_json(msg='boto required for this module')
if distutils.version.StrictVersion(boto.__version__) < distutils.version.StrictVersion(MINIMUM_BOTO_VERSION):
module.fail_json(msg='Found boto in version %s, but >= %s is required' % (boto.__version__, MINIMUM_BOTO_VERSION))
command_in = module.params.get('command')
zone_in = module.params.get('zone').lower()
hosted_zone_id_in = module.params.get('hosted_zone_id')