From: Julien Rioux Date: Mon, 15 Apr 2013 14:25:42 +0000 (-0400) Subject: lilypond-book: File search fallback when kpsewhich fails. X-Git-Tag: release/2.17.17-1~22 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5588362a4f34f93ecc0d28f7e4e3c61b2af3c2b4;hp=e375bc55aea13a75a7ee56248703c30108c25d57;p=lilypond.git lilypond-book: File search fallback when kpsewhich fails. --- diff --git a/python/book_latex.py b/python/book_latex.py index 8d2104b08d..756bc2c651 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -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: