Skip to content

Commit a13507c

Browse files
authored
Simply suppress the exception.
1 parent d54bfb0 commit a13507c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

distutils/dist.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,8 @@ def _gen_paths(self):
346346
prefix = '.' * (os.name == 'posix')
347347
filename = prefix + 'pydistutils.cfg'
348348
if self.want_user_cfg:
349-
try:
349+
with contextlib.suppress(RuntimeError):
350350
yield pathlib.Path('~').expanduser() / filename
351-
except RuntimeError:
352-
warnings.warn(
353-
"Failed to locate user home directory. Skipping user config."
354-
)
355351

356352
# All platforms support local setup.cfg
357353
yield pathlib.Path('setup.cfg')

0 commit comments

Comments
 (0)