Fix HAS_BOTO fail_json call for ec2_ami_copy

pull/18777/head
Matt Martz 9 years ago committed by Matt Clay
parent 23222160e4
commit 577f56ac79

@ -91,9 +91,6 @@ try:
HAS_BOTO = True
except ImportError:
HAS_BOTO = False
if not HAS_BOTO:
module.fail_json(msg='boto required for this module')
def copy_image(module, ec2):
"""
@ -183,6 +180,9 @@ def main():
module = AnsibleModule(argument_spec=argument_spec)
if not HAS_BOTO:
module.fail_json(msg='boto required for this module')
try:
ec2 = ec2_connect(module)
except boto.exception.NoAuthHandlerFound, e:

Loading…
Cancel
Save