Skip to content

Commit 01fbd65

Browse files
committed
Let pathlib resolve the flavor.
1 parent a7fdc06 commit 01fbd65

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

distutils/tests/test_dir_util.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,7 @@ def mkdir(self, *args, **kwargs):
126126
raise OSError("Failed to create directory")
127127

128128
if sys.version_info < (3, 12):
129-
_flavour = (
130-
pathlib._windows_flavour
131-
if os.name == 'nt'
132-
else pathlib._posix_flavour
133-
)
129+
_flavour = pathlib.Path()._flavour
134130

135131
target = tmp_path / 'foodir'
136132

0 commit comments

Comments
 (0)