Skip to content

Commit db5e9b8

Browse files
committed
rm workaround not needed since py38
1 parent 34799a5 commit db5e9b8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/requests/utils.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,7 @@ def get_netrc_auth(url, raise_errors=False):
219219
netrc_path = None
220220

221221
for f in netrc_locations:
222-
try:
223-
loc = os.path.expanduser(f)
224-
except KeyError:
225-
# os.path.expanduser can fail when $HOME is undefined and
226-
# getpwuid fails. See https://bugs.python.org/issue20164 &
227-
# https://github.com/psf/requests/issues/1846
228-
return
229-
222+
loc = os.path.expanduser(f)
230223
if os.path.exists(loc):
231224
netrc_path = loc
232225
break

0 commit comments

Comments
 (0)