Handle missing command.

This commit is contained in:
Jelmer Vernooij 2021-03-17 04:39:34 +00:00
parent 9635b68648
commit 14e3726ae8

View file

@ -20,6 +20,7 @@ from typing import List, Optional
from buildlog_consultant.common import (
find_build_failure_description,
MissingCommand,
)
from breezy.mutabletree import MutableTree
@ -66,7 +67,11 @@ def run_with_build_fixers(session: Session, args: List[str], fixers: List[BuildF
logging.info("Running %r", args)
fixed_errors = []
while True:
try:
retcode, contents = run_with_tee(session, args)
except FileNotFoundError as e:
error = MissingCommand(e.args[0])
else:
if retcode == 0:
return
lines = ''.join(contents).splitlines(True)