From fe957b247c6d60485ea02f6bc3daaf71723382e4 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Fri, 20 Sep 2019 10:20:26 +0200 Subject: [PATCH 5/5] Fix the last issues with lilypond-book and Python 3 This finally makes the targets check / test and doc pass! --- python/book_docbook.py | 2 +- python/book_html.py | 2 +- python/book_latex.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/book_docbook.py b/python/book_docbook.py index ef009935d6..ec5cbc037c 100644 --- a/python/book_docbook.py +++ b/python/book_docbook.py @@ -104,7 +104,7 @@ class BookDocbookOutputFormat (BookBase.BookOutputFormat): self.snippet_res = Docbook_snippet_res self.output = Docbook_output self.handled_extensions = ['.lyxml'] - self.snippet_option_separator = '\s*' + self.snippet_option_separator = '\s+' def adjust_snippet_command (self, cmd): if '--formats' not in cmd: diff --git a/python/book_html.py b/python/book_html.py index ac70b743a0..cb9c585378 100644 --- a/python/book_html.py +++ b/python/book_html.py @@ -104,7 +104,7 @@ class BookHTMLOutputFormat (BookBase.BookOutputFormat): self.snippet_res = HTML_snippet_res self.output = HTML_output self.handled_extensions = ['.html', '.xml','.htmly'] - self.snippet_option_separator = '\s*' + self.snippet_option_separator = '\s+' def split_snippet_options (self, option_string): if option_string: diff --git a/python/book_latex.py b/python/book_latex.py index ec5412b1d8..595095c9e3 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -234,7 +234,7 @@ def get_latex_textwidth (source, global_options): if os.path.exists (auxfile): os.unlink (auxfile) if os.path.exists (logfile): - parameter_string = file (logfile).read() + parameter_string = open (logfile).read() os.unlink (logfile) columns = 0 -- 2.23.0