Create the temp directory if it doesn't exist

This commit is contained in:
Pedro Algarvio 2020-03-24 16:31:20 +00:00 committed by Daniel Wozniak
parent 27a5e95541
commit c5feb6859a

View file

@ -651,6 +651,9 @@ def temp_directory(name=None):
else:
directory_path = tempfile.mkdtemp(dir=RUNTIME_VARS.TMP)
if not os.path.isdir(directory_path):
os.makedirs(directory_path)
yield directory_path
shutil.rmtree(directory_path, ignore_errors=True)