diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-29 13:11:56 +0000 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-29 13:11:56 +0000 |
commit | 45d5d6da1bc126a6fb5995545a4ae78d018bf753 (patch) | |
tree | 116922e37bd8b825284b283f5c71182d241b76e1 /project/boost/archive.py | |
parent | project.boost: -d0 by default (diff) | |
download | cmake-common-45d5d6da1bc126a6fb5995545a4ae78d018bf753.tar.gz cmake-common-45d5d6da1bc126a6fb5995545a4ae78d018bf753.zip |
fix READMEs, code style, etc.
Diffstat (limited to '')
-rw-r--r-- | project/boost/archive.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/project/boost/archive.py b/project/boost/archive.py index 55d05f2..e4c85e0 100644 --- a/project/boost/archive.py +++ b/project/boost/archive.py @@ -75,8 +75,10 @@ class TemporaryStorage(ArchiveStorage): @contextmanager def write_archive(self, version, contents): - with tempfile.NamedTemporaryFile(prefix=f'boost_{version}_', suffix=version.archive_ext, - dir=self._dir, delete=False) as dest: + temp = tempfile.NamedTemporaryFile(prefix=f'boost_{version}_', + suffix=version.archive_ext, + dir=self._dir, delete=False) + with temp as dest: path = dest.name logging.info('Writing Boost archive: %s', path) dest.write(contents) |