1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[ecs_service_facts] replace map with dict for Python3 compatibility (#35355)

This commit is contained in:
Sloane Hertel 2018-02-07 21:05:51 -05:00 committed by ansibot
parent 927ef22ad6
commit e10e1d6ddf

View file

@ -167,7 +167,9 @@ class EcsServiceManager:
fn_args['cluster'] = cluster
fn_args['services'] = services.split(",")
response = self.ecs.describe_services(**fn_args)
relevant_response = dict(services=map(self.extract_service_from, response['services']))
relevant_response = {'services': []}
for service in response.get('services', []):
relevant_response['services'].append(self.extract_service_from(service))
if 'failures' in response and len(response['failures']) > 0:
relevant_response['services_not_running'] = response['failures']
return relevant_response