Skip to content

Commit

Permalink
Simply suppress the exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco authored Aug 26, 2024
1 parent d54bfb0 commit a13507c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions distutils/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,8 @@ def _gen_paths(self):
prefix = '.' * (os.name == 'posix')
filename = prefix + 'pydistutils.cfg'
if self.want_user_cfg:
try:
with contextlib.suppress(RuntimeError):
yield pathlib.Path('~').expanduser() / filename
except RuntimeError:
warnings.warn(
"Failed to locate user home directory. Skipping user config."
)

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

0 comments on commit a13507c

Please sign in to comment.