From 84612577ba2727a1b1478569cadec4b76e5a939a Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Tue, 19 Jun 2018 16:36:45 -0400 Subject: [PATCH] [aws] Remove unused return in ec2_vpc_dhcp_option_facts module (#41709) --- .../modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py index 9f6c6ef08d4..3b0bb39800b 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py @@ -108,10 +108,8 @@ def list_dhcp_options(client, module): module.fail_json(msg=str(e), exception=traceback.format_exc(), **camel_dict_to_snake_dict(e.response)) - results = [camel_dict_to_snake_dict(get_dhcp_options_info(option)) - for option in all_dhcp_options['DhcpOptions']] - - module.exit_json(dhcp_options=results) + return [camel_dict_to_snake_dict(get_dhcp_options_info(option)) + for option in all_dhcp_options['DhcpOptions']] def main(): @@ -144,7 +142,7 @@ def main(): # call your function here results = list_dhcp_options(connection, module) - module.exit_json(result=results) + module.exit_json(dhcp_options=results) if __name__ == '__main__':