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

pull/35835/merge
Sloane Hertel 7 years ago committed by ansibot
parent 927ef22ad6
commit e10e1d6ddf

@ -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

Loading…
Cancel
Save