Skip to content

Commit 9824bd8

Browse files
cj81499abravalheri
andauthored
Update distutils/dist.py
Co-authored-by: Anderson Bravalheri <[email protected]>
1 parent 7b17c15 commit 9824bd8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

distutils/dist.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,9 @@ def _gen_paths(self):
355355
filename = prefix + 'pydistutils.cfg'
356356
if self.want_user_cfg:
357357
try:
358-
user_home = pathlib.Path('~').expanduser()
358+
yield pathlib.Path('~').expanduser() / filename
359359
except RuntimeError:
360-
self.announce("Failed to locate user home directory. Skipping user config.", logging.WARNING)
361-
else:
362-
yield user_home / filename
360+
warnings.warn("Failed to locate user home directory. Skipping user config.")
363361

364362
# All platforms support local setup.cfg
365363
yield pathlib.Path('setup.cfg')

0 commit comments

Comments
 (0)