summaryrefslogtreecommitdiff
path: root/buildstream/plugins
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-04-08 19:59:41 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-04-08 19:59:41 +0900
commitae2f6f5665c423682daeb8ae43abc400605b2dc4 (patch)
tree503b54c1966f53925a33f23a134cea0b25dd5912 /buildstream/plugins
parentb3938f07d6eb59a06c64bb04352f2045eba72357 (diff)
downloadbuildstream-ae2f6f5665c423682daeb8ae43abc400605b2dc4.tar.gz
ostree.py source plugin: Use Source.tempdir() context manager
Diffstat (limited to 'buildstream/plugins')
-rw-r--r--buildstream/plugins/sources/ostree.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/buildstream/plugins/sources/ostree.py b/buildstream/plugins/sources/ostree.py
index ab4f600b1..c0076cac2 100644
--- a/buildstream/plugins/sources/ostree.py
+++ b/buildstream/plugins/sources/ostree.py
@@ -125,9 +125,7 @@ class OSTreeSource(Source):
self.ensure()
# Checkout self.ref into the specified directory
- os.makedirs(self.get_mirror_directory(), exist_ok=True)
- with tempfile.TemporaryDirectory(prefix='tmp', dir=self.get_mirror_directory()) as tmpdir:
-
+ with self.tempdir() as tmpdir:
checkoutdir = os.path.join(tmpdir, 'checkout')
with self.timed_activity("Staging ref: {} from origin: {}"