Skip to content

Commit 1b10434

Browse files
committed
fixup
1 parent 39fec62 commit 1b10434

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/support/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,10 @@ def _temppath(tmp_path, test_case, ensure_dir=False, skip_clean=False):
367367
if ensure_dir:
368368
try:
369369
os.mkdir(tmp_path)
370-
except FileExistsError:
371-
raise AssertionError(
372-
"ABORT: use of unclean output path: %s" % tmp_path)
370+
except OSError as oserr:
371+
if oserr.errno == errno.EEXIST:
372+
raise AssertionError(
373+
"ABORT: use of unclean output path: %s" % tmp_path)
373374
if not skip_clean:
374375
test_case._cleanup_paths.add(tmp_path)
375376
return tmp_path

0 commit comments

Comments
 (0)