diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-01-03 11:45:23 -0500 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-01-03 11:45:23 -0500 |
commit | dfd6a6599b2b9886dca68de5300283fc3d78fb00 (patch) | |
tree | 52f32ca680e853e1bda75e31357b51f5720b0e30 /buildstream | |
parent | 57b0cf73291c4a44e846d45d833e57d7facc6a7d (diff) | |
download | buildstream-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')
-rw-r--r-- | buildstream/_artifactcache.py | 2 |
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)) |