summaryrefslogtreecommitdiffstats
path: root/test/lib/ansible_test/_internal/util_common.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2021-02-02 20:47:38 +0100
committerMatt Clay <matt@mystile.com>2021-04-12 21:40:36 +0200
commitb752d071633d244f98f327306e160f7915f38829 (patch)
tree860fbe7949cc589c5c5e2ccbfb8a53cd2666960c /test/lib/ansible_test/_internal/util_common.py
parentconfig lookup can query plugin settings (#74186) (diff)
downloadansible-b752d071633d244f98f327306e160f7915f38829.tar.xz
ansible-b752d071633d244f98f327306e160f7915f38829.zip
Overhaul ansible-test container management.
This brings ansible-test closer to being able to support split controller/remote testing.
Diffstat (limited to 'test/lib/ansible_test/_internal/util_common.py')
-rw-r--r--test/lib/ansible_test/_internal/util_common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_internal/util_common.py b/test/lib/ansible_test/_internal/util_common.py
index 40dc68b07a..370a8ca03c 100644
--- a/test/lib/ansible_test/_internal/util_common.py
+++ b/test/lib/ansible_test/_internal/util_common.py
@@ -219,7 +219,7 @@ def named_temporary_file(args, prefix, suffix, directory, content):
:rtype: str
"""
if args.explain:
- yield os.path.join(directory, '%stemp%s' % (prefix, suffix))
+ yield os.path.join(directory or '/tmp', '%stemp%s' % (prefix, suffix))
else:
with tempfile.NamedTemporaryFile(prefix=prefix, suffix=suffix, dir=directory) as tempfile_fd:
tempfile_fd.write(to_bytes(content))