Merge "Fix collectd-sensubility script output"

This commit is contained in:
Zuul 2022-08-24 02:49:59 +00:00 committed by Gerrit Code Review
commit 469ff82cf0

View File

@ -55,7 +55,7 @@ def execute(cmd, workdir: str = None,
def fetch_container_health(containers):
out = {}
out = []
for cont in set(containers.split('\n')) - set(SKIP_LIST):
if not cont:
continue
@ -76,7 +76,7 @@ def fetch_container_health(containers):
item['status'] = 'running' if item['status'] else 'stopped'
item['healthy'] = int(item['healthy'] == 'healthy')
out[item['service']] = item
out.append(item)
return 0, out