diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-23 20:39:06 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-23 20:49:39 +0300 |
commit | f2806f803c62f25b2435e03aaaf6652c4650633e (patch) | |
tree | fdd55107590f960345fbb241e2e10cc0b7ec5608 /project/utils.py | |
parent | project: minor refactoring (diff) | |
download | cmake-common-f2806f803c62f25b2435e03aaaf6652c4650633e.tar.gz cmake-common-f2806f803c62f25b2435e03aaaf6652c4650633e.zip |
project.boost: refactoring
The extremely convoluted BoostBuildToolset situation is no more.
Diffstat (limited to '')
-rw-r--r-- | project/utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
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 |