Skip to content

Commit 853daa9

Browse files
committed
Handle exotic early blockers
1 parent 05238c8 commit 853daa9

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

mypy/build_worker/worker.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -321,24 +321,27 @@ def flush_errors(filename: str | None, new_messages: list[str], is_serious: bool
321321
# We never flush errors in the worker, we send them back to coordinator.
322322
pass
323323

324-
return BuildManager(
325-
data_dir,
326-
search_paths,
327-
ignore_prefix=os.getcwd(),
328-
source_set=source_set,
329-
reports=None,
330-
options=options,
331-
version_id=__version__,
332-
plugin=plugin,
333-
plugins_snapshot=snapshot,
334-
errors=ctx.errors,
335-
error_formatter=None if options.output is None else OUTPUT_CHOICES.get(options.output),
336-
flush_errors=flush_errors,
337-
fscache=ctx.fscache,
338-
stdout=sys.stdout,
339-
stderr=sys.stderr,
340-
parallel_worker=True,
341-
)
324+
try:
325+
return BuildManager(
326+
data_dir,
327+
search_paths,
328+
ignore_prefix=os.getcwd(),
329+
source_set=source_set,
330+
reports=None,
331+
options=options,
332+
version_id=__version__,
333+
plugin=plugin,
334+
plugins_snapshot=snapshot,
335+
errors=ctx.errors,
336+
error_formatter=None if options.output is None else OUTPUT_CHOICES.get(options.output),
337+
flush_errors=flush_errors,
338+
fscache=ctx.fscache,
339+
stdout=sys.stdout,
340+
stderr=sys.stderr,
341+
parallel_worker=True,
342+
)
343+
except CompileError:
344+
return None
342345

343346

344347
def console_entry() -> None:

0 commit comments

Comments
 (0)