diff options
author | Julien Rioux <jrioux@physics.utoronto.ca> | 2013-04-15 10:25:42 -0400 |
---|---|---|
committer | Julien Rioux <jrioux@physics.utoronto.ca> | 2013-04-21 14:21:15 -0400 |
commit | 5588362a4f34f93ecc0d28f7e4e3c61b2af3c2b4 (patch) | |
tree | e0d799671cd75e6d340c936b0f3220160cf7d48f /python | |
parent | e375bc55aea13a75a7ee56248703c30108c25d57 (diff) |
lilypond-book: File search fallback when kpsewhich fails.
Diffstat (limited to 'python')
-rw-r--r-- | python/book_latex.py | 7 |
1 files changed, 4 insertions, 3 deletions
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: |