Pipeline: Be more resilient to compilation failur from earlier pipeline command
@@ -201,6 +201,8 @@ def _get_compilation_results_dir(compiled_tex_dir: RelativePath) -> RelativePath
def _did_compilation_succeed(compiled_tex_dir: RelativePath) -> bool:
result_path = os.path.join(_get_compilation_results_dir(compiled_tex_dir), "result")
+ if not os.path.exists(result_path):
+ return False
with open(result_path) as result_file:
result = result_file.read().strip()
return result == "True"
@@ -235,7 +237,7 @@ def get_compiled_tex_files(compiled_tex_dir: RelativePath) -> List[CompiledTexFi
if not os.path.exists(compiled_tex_files_path):
logging.warning( # pylint: disable=logging-not-lazy
"Although compilation succeeded for TeX compilation in directory %s, no "
- + "no specific TeX files were logged as having been compiled. Something "
+ + "specific TeX files were logged as having been compiled. Something "
+ "unexpected must have happened during compilation of the TeX.",
compiled_tex_dir,
)
