Merge pull request #538 from oliv3r/fix/allow_outdir_to_exist

Simplify the target dir test
This commit is contained in:
Salvador E. Tropea 2024-01-02 10:52:27 -03:00 committed by GitHub
commit 57fe22ff3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -362,8 +362,8 @@ def get_output_dir(o_dir, obj, dry=False):
outdir = os.path.abspath(obj.expand_dirname(os.path.join(GS.out_dir, o_dir)))
# Create directory if needed
logger.debug("Output destination: {}".format(outdir))
if not dry and not os.path.exists(outdir):
os.makedirs(outdir)
if not dry:
os.makedirs(outdir, exist_ok=True)
return outdir