From f2806f803c62f25b2435e03aaaf6652c4650633e Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 23 Mar 2021 20:39:06 +0300 Subject: project.boost: refactoring The extremely convoluted BoostBuildToolset situation is no more. --- project/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'project/utils.py') diff --git a/project/utils.py b/project/utils.py index c63b8a4..8485dfa 100644 --- a/project/utils.py +++ b/project/utils.py @@ -68,7 +68,7 @@ def delete(path): @contextmanager -def temp_file(contents, **kwargs): +def temp_file(**kwargs): '''Make NamedTemporaryFile usable on Windows. It can't be opened a second time on Windows, hence this silliness. @@ -76,8 +76,7 @@ def temp_file(contents, **kwargs): tmp = tempfile.NamedTemporaryFile(delete=False, **kwargs) with tmp as file, delete_on_error(file.name): path = file.name - logging.info('Writing temporary file: %s', path) - file.write(contents) + logging.info('Created temporary file: %s', path) with delete(path): yield path -- cgit v1.2.3