]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-book: File search fallback when kpsewhich fails.
authorJulien Rioux <jrioux@physics.utoronto.ca>
Mon, 15 Apr 2013 14:25:42 +0000 (10:25 -0400)
committerJulien Rioux <jrioux@physics.utoronto.ca>
Sun, 21 Apr 2013 18:21:15 +0000 (14:21 -0400)
python/book_latex.py

index 8d2104b08dd5e5a880a4dc3c9b6dc363e570315c..756bc2c651ded4249cf0e335dd4f253c34f17309 100644 (file)
@@ -296,9 +296,10 @@ class BookLatexOutputFormat (BookBase.BookOutputFormat):
     def input_fullname (self, input_filename):
         # Use kpsewhich if available, otherwise fall back to the default:
         if ly.search_exe_path ('kpsewhich'):
-            return os.popen ('kpsewhich ' + input_filename).read()[:-1]
-        else:
-            return BookBase.BookOutputFormat.input_fullname (self, input_filename)
+            trial = os.popen ('kpsewhich ' + input_filename).read()[:-1]
+            if trial:
+                return trial
+        return BookBase.BookOutputFormat.input_fullname (self, input_filename)
 
     def process_chunks (self, chunks):
         for c in chunks: