From 1b7379df29968157857df7374232170c7d548665 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 8 Aug 2014 15:24:19 -0400 Subject: [PATCH] Fix workers to not always be marked as unhealthy --- workers/dockerfilebuild.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index 389e83cb8..564dd9f5f 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -45,7 +45,8 @@ def matches_system_error(status_str): for match in KNOWN_MATCHES: # 4 because we might have a Unix control code at the start. - if status_str.find(match[0:len(match) + 4]) <= 4: + found = status_str.find(match[0:len(match) + 4]) + if found >= 0 and found <= 4: return True return False