Fix HAS_BOTO fail_json call for ec2_ami_copy
This commit is contained in:
parent
b4de5ec208
commit
081845b353
1 changed files with 3 additions and 3 deletions
|
@ -88,9 +88,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):
|
||||
"""
|
||||
|
@ -180,6 +177,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…
Reference in a new issue