]> git.lyx.org Git - features.git/commitdiff
The call to cmdOutput can throw an exception, so we need to be careful
authorRichard Heck <rgheck@comcast.net>
Fri, 26 Aug 2011 23:06:15 +0000 (23:06 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 26 Aug 2011 23:06:15 +0000 (23:06 +0000)
here, lest configure.py abort.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39529 a592a061-630c-0410-9148-cb99ea01b6c8

lib/configure.py

index 9fbba18799d6b8c24360ace18a8b36195553f32c..5ca32a51924a7130319aa969fc9f1220497458f2 100644 (file)
@@ -415,7 +415,14 @@ def checkLuatex():
 \end{document}
 ''')
         # run lualatex on luatest.tex and check result
-        luatest = cmdOutput(LUATEX + ' luatest.tex')
+        try:
+            luatest = cmdOutput(LUATEX + ' luatest.tex')
+        except:
+            # certainly not working
+            logger.info('LuaTeX call failed.')
+            # remove temporary files
+            removeFiles(['luatest.tex', 'luatest.log', 'luatest.aux', 'luatest.pdf'])
+            return
         if luatest.find('XeTeX is required to compile this document') != -1:
             # fontspec/luatex too old! We do not support this version.
             logger.info(msg + ' no (probably not recent enough)')