aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/boost/archive.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-29 13:11:56 +0000
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-29 13:11:56 +0000
commit45d5d6da1bc126a6fb5995545a4ae78d018bf753 (patch)
tree116922e37bd8b825284b283f5c71182d241b76e1 /project/boost/archive.py
parentproject.boost: -d0 by default (diff)
downloadcmake-common-45d5d6da1bc126a6fb5995545a4ae78d018bf753.tar.gz
cmake-common-45d5d6da1bc126a6fb5995545a4ae78d018bf753.zip
fix READMEs, code style, etc.
Diffstat (limited to 'project/boost/archive.py')
-rw-r--r--project/boost/archive.py6
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)