diff --git a/deploy-agent/deployd/agent.py b/deploy-agent/deployd/agent.py index e89785e5c4..10fb99feae 100644 --- a/deploy-agent/deployd/agent.py +++ b/deploy-agent/deployd/agent.py @@ -128,7 +128,7 @@ def serve_build(self): for status in self._envs.values(): # for each container, we check the health status try: - healthStatus = utils.get_container_health_info(status.build_info.build_commit) + healthStatus = get_container_health_info(status.build_info.build_commit) if healthStatus: status.report.containerHealthStatus = healthStatus else: diff --git a/deploy-agent/deployd/common/utils.py b/deploy-agent/deployd/common/utils.py index 109894d2d7..7fa31147b3 100644 --- a/deploy-agent/deployd/common/utils.py +++ b/deploy-agent/deployd/common/utils.py @@ -239,10 +239,7 @@ def get_container_health_info(commit): result = result + name + ":" + status.decode().strip() + ";" except: continue - if result != "": - return result - else: - return None + return result if result else None else: return None except: