Fail module instead of returning boolean value

Fix added to fail module instead of returning boolean value
which raises AttributeError.

Fixes #21770

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-06-12 14:17:54 +05:30 committed by Brian Coca
parent cb704a4310
commit a4f1738082

View file

@ -182,7 +182,6 @@ def _create_stack(module, stack, cloud):
if stack.stack_status == 'CREATE_COMPLETE': if stack.stack_status == 'CREATE_COMPLETE':
return stack return stack
else: else:
return False
module.fail_json(msg="Failure in creating stack: {0}".format(stack)) module.fail_json(msg="Failure in creating stack: {0}".format(stack))
except shade.OpenStackCloudException as e: except shade.OpenStackCloudException as e:
module.fail_json(msg=str(e)) module.fail_json(msg=str(e))