summaryrefslogtreecommitdiff
path: root/buildstream/_artifactcache.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-01-03 11:45:23 -0500
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-01-03 11:45:23 -0500
commitdfd6a6599b2b9886dca68de5300283fc3d78fb00 (patch)
tree52f32ca680e853e1bda75e31357b51f5720b0e30 /buildstream/_artifactcache.py
parent57b0cf73291c4a44e846d45d833e57d7facc6a7d (diff)
downloadbuildstream-dfd6a6599b2b9886dca68de5300283fc3d78fb00.tar.gz
_artifactcache.py: Precautions with TemporaryDirectory
Dont pass in a None suffix to the tempfile.TemporaryDirectory() constructor, this causes exceptions in python 3.4, even though we require python >= 3.5 might as well patch this up.
Diffstat (limited to 'buildstream/_artifactcache.py')
-rw-r--r--buildstream/_artifactcache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py
index 1c88dfd12..3060ee952 100644
--- a/buildstream/_artifactcache.py
+++ b/buildstream/_artifactcache.py
@@ -104,7 +104,7 @@ class ArtifactCache():
_, rev = self.repo.resolve_rev(ref, False)
os.makedirs(self.extractdir, exist_ok=True)
- with tempfile.TemporaryDirectory(None, 'tmp', self.extractdir) as tmpdir:
+ with tempfile.TemporaryDirectory(prefix='tmp', dir=self.extractdir) as tmpdir:
checkoutdir = os.path.join(tmpdir, ref)
os.makedirs(os.path.dirname(checkoutdir))