diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2017-12-13 12:54:25 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-12-13 12:52:41 -0500 |
commit | c0b1b4675fa6ea9d23762e5ba1a4405afe169c63 (patch) | |
tree | 54b02127db51e4e64536124b2d0dbdcceae13f2e /buildstream | |
parent | 82f4afdd11b96d2425781e14a27cad6f34c967c9 (diff) | |
download | buildstream-c0b1b4675fa6ea9d23762e5ba1a4405afe169c63.tar.gz |
source: clarify note on why to use this tmpdir()
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/source.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/buildstream/source.py b/buildstream/source.py index 118f5841e..f610e90af 100644 --- a/buildstream/source.py +++ b/buildstream/source.py @@ -135,9 +135,10 @@ class Source(Plugin): Yields: (str): A path to a temporary directory - This should be used by source plugins directly instead of the - tempfile module, as it will take care of cleaning up the temporary - directory in the case of forced termination. + This should be used by source plugins directly instead of the tempfile + module. This one will automatically cleanup in case of termination by + catching the signal before os._exit(). It will also use the 'mirror + directory' as expected for a source. """ mirrordir = self.get_mirror_directory() with utils._tempdir(dir=mirrordir) as tempdir: |