From 201628c91fd0d27d05afda9536c88d753383b906 Mon Sep 17 00:00:00 2001 From: matsb Date: Tue, 14 Mar 2006 14:44:36 +0000 Subject: [PATCH] * scripts/lilypond-book.py (LATEX_INSPECTION_DOCUMENT): Use the file descriptor returned by tempfile.mkstemp() when writing to tmpfile and closing it. Solves problem with unlink(tmpfile) on mingw. --- ChangeLog | 7 +++++++ scripts/lilypond-book.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b2d80a7d88..774efcf913 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-03-14 Mats Bengtsson + + * scripts/lilypond-book.py (LATEX_INSPECTION_DOCUMENT): Use the + file descriptor returned by tempfile.mkstemp() when writing + to tmpfile and closing it. Solves problem with unlink(tmpfile) + on mingw. + 2006-03-14 Jan Nieuwenhuizen * po/fi.po: newline bugfix. diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index f2f48142cd..3905e8da2c 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1409,7 +1409,7 @@ def get_latex_textwidth (source): logfile = os.path.splitext (tmpfile)[0] + '.log' logfile = os.path.split (logfile)[1] - tmp_handle = open (tmpfile,'w') + tmp_handle = os.fdopen (handle,'w') tmp_handle.write (latex_document) tmp_handle.close () -- 2.39.5