Skip to content

Commit

Permalink
Merge pull request #278 from cj81499/handle-failure-to-find-user-home
Browse files Browse the repository at this point in the history
handle failures to find a user home directory
  • Loading branch information
jaraco authored Aug 26, 2024
2 parents 2e8c2a2 + a13507c commit 6c224d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion distutils/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ def _gen_paths(self):
prefix = '.' * (os.name == 'posix')
filename = prefix + 'pydistutils.cfg'
if self.want_user_cfg:
yield pathlib.Path('~').expanduser() / filename
with contextlib.suppress(RuntimeError):
yield pathlib.Path('~').expanduser() / filename

# All platforms support local setup.cfg
yield pathlib.Path('setup.cfg')
Expand Down

0 comments on commit 6c224d3

Please sign in to comment.