Commit cb4b6ab3 authored by André Anjos's avatar André Anjos 💬
Browse files

[scripts.mirror] Set tempfile's tempdir variable to the temporary directory just created

parent b0446b08
Pipeline #34726 passed with stages
in 3 minutes and 42 seconds
...@@ -126,8 +126,9 @@ def mirror( ...@@ -126,8 +126,9 @@ def mirror(
# creates a self destructing temporary directory that will act as temporary # creates a self destructing temporary directory that will act as temporary
# directory for the rest of this program # directory for the rest of this program
tmpdir2 = tempfile.TemporaryDirectory(prefix='bdt-mirror-tmp', dir=tmpdir) tmpdir2 = tempfile.TemporaryDirectory(prefix='bdt-mirror-tmp', dir=tmpdir)
tempfile.tempdir = tmpdir2.name
os.environ['TMPDIR'] = tmpdir2.name os.environ['TMPDIR'] = tmpdir2.name
logger.info('Setting $TMPDIR to %s', tmpdir2.name) logger.info('Setting $TMPDIR and `tempfile.tempdir` to %s', tmpdir2.name)
# if we are in a dry-run mode, let's let it be known # if we are in a dry-run mode, let's let it be known
if dry_run: if dry_run:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment