Handle missing command.
This commit is contained in:
parent
9635b68648
commit
14e3726ae8
1 changed files with 17 additions and 12 deletions
|
@ -20,6 +20,7 @@ from typing import List, Optional
|
||||||
|
|
||||||
from buildlog_consultant.common import (
|
from buildlog_consultant.common import (
|
||||||
find_build_failure_description,
|
find_build_failure_description,
|
||||||
|
MissingCommand,
|
||||||
)
|
)
|
||||||
from breezy.mutabletree import MutableTree
|
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)
|
logging.info("Running %r", args)
|
||||||
fixed_errors = []
|
fixed_errors = []
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
retcode, contents = run_with_tee(session, args)
|
retcode, contents = run_with_tee(session, args)
|
||||||
|
except FileNotFoundError as e:
|
||||||
|
error = MissingCommand(e.args[0])
|
||||||
|
else:
|
||||||
if retcode == 0:
|
if retcode == 0:
|
||||||
return
|
return
|
||||||
lines = ''.join(contents).splitlines(True)
|
lines = ''.join(contents).splitlines(True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue