Skip to content

Commit 3ea1869

Browse files
pfalconnashif
authored andcommitted
sanitycheck: Use os.makedirs to create --report-dir.
os.mkdir() is not suitable to create arbitrary directory path (can create only a subdir of an existing dir, will error out if already exists), os.makedirs() should be always used in such cases. Signed-off-by: Paul Sokolovsky <[email protected]>
1 parent 04c334a commit 3ea1869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/sanitycheck

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,7 @@ class TestSuite:
23242324
report_name = options.report_name
23252325

23262326
if options.report_dir:
2327-
os.mkdir(options.report_dir)
2327+
os.makedirs(options.report_dir, exist_ok=True)
23282328
filename = os.path.join(options.report_dir, report_name)
23292329
outdir = options.report_dir
23302330
else:

0 commit comments

Comments
 (0)