From be468ff9d3ff99eee669defd88aaf0c5237ac99a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 31 Jul 2015 20:57:14 -0700 Subject: [PATCH] result is now a dict and so needs different access syntax Fixes #1848 --- cloud/amazon/ec2_lc.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cloud/amazon/ec2_lc.py b/cloud/amazon/ec2_lc.py index 179ef14d70f..60944d40c1f 100644 --- a/cloud/amazon/ec2_lc.py +++ b/cloud/amazon/ec2_lc.py @@ -239,12 +239,13 @@ def create_launch_config(connection, module): module.fail_json(msg=str(e)) result = dict( - ((a[0], a[1]) for a in vars(launch_configs[0]) if a[0] not in ('connection',))) + ((a[0], a[1]) for a in vars(launch_configs[0]).items() if a[0] not in ('connection', 'created_time'))) + result['created_time'] = str(launch_configs[0].created_time) - module.exit_json(changed=changed, name=result.name, created_time=str(result.created_time), - image_id=result.image_id, arn=result.launch_configuration_arn, - security_groups=result.security_groups, - instance_type=result.instance_type, + module.exit_json(changed=changed, name=result['name'], created_time=result['created_time'], + image_id=result['image_id'], arn=result['launch_configuration_arn'], + security_groups=result['security_groups'], + instance_type=result['instance_type'], result=result)