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