commit 64e0c5589c866a505bebff87da98a08979848516 Author: Richard Heck <rgh...@lyx.org> Date: Wed Mar 19 12:42:57 2014 -0400
Return an error if LaTeX is unable to compile the file. diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index fdc5a8e..d16e867 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -293,6 +293,8 @@ def legacy_conversion_step1(latex_file, dpi, output_format, fg_color, bg_color, # Compile the latex file. latex_status, latex_stdout = run_latex(latex, latex_file) + if latex_status: + return (latex_status, []) if pdf_output: return legacy_conversion_step3(latex_file, dpi, output_format, True, skipMetrics) diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 4a2cddb..ace46d2 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -409,6 +409,8 @@ def main(argv): # Compile the latex file. latex_status, latex_stdout = run_latex(latex, latex_file, bibtex) + if latex_status: + return (latex_status, []) # The dvi output file name dvi_file = latex_file_re.sub(".dvi", latex_file)