]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/lyxpreview2bitmap.py
Pass parameters by reference (performance)
[lyx.git] / lib / scripts / lyxpreview2bitmap.py
index 09ac3a936820a85dc01b2f222bbf31398176f270..ace46d21c69599ebafab87313b9854dc5d44d3ae 100755 (executable)
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
 # file lyxpreview2bitmap.py
@@ -367,8 +366,7 @@ def main(argv):
     progress("Altering the latex file for font size and colors")
 
     # Omit font size specification in latex file.
-    if not fix_latex_file(latex_file):
-        warning("Unable to remove font size from the latex file")
+    fix_latex_file(latex_file)
 
     if lilypond:
         progress("Preprocess the latex file through %s" % lilypond_book)
@@ -411,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)