diff --git a/distutils/dist.py b/distutils/dist.py index 1dc25fe5..917cd94a 100644 --- a/distutils/dist.py +++ b/distutils/dist.py @@ -334,7 +334,7 @@ def find_config_files(self): - a file named by an environment variable """ check_environ() - files = [str(path) for path in self._gen_paths() if path.is_file()] + files = [str(path) for path in self._gen_paths() if os.path.isfile(path)] if DEBUG: self.announce("using config files: %s" % ', '.join(files)) diff --git a/distutils/tests/test_dist.py b/distutils/tests/test_dist.py index 0f205fe4..e6135dbf 100644 --- a/distutils/tests/test_dist.py +++ b/distutils/tests/test_dist.py @@ -258,7 +258,6 @@ def test_find_config_files_disable(self, temp_home): # make sure --no-user-cfg disables the user cfg file assert len(all_files) - 1 == len(files) - @pytest.mark.xfail(reason="pypa/distutils#181", strict=True) @pytest.mark.skipif( 'platform.system() == "Windows"', 'Windows does not honor chmod 000',