Skip to content
Myr

netrc fix

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent de0658f · Browse files · 1 file+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:requests/utils.py+4 added-2 removed
44 unmodified lines
45 host = ri.netloc.split(':')[0]4647 try:48 _netrc = netrc(netrc_path).authenticators(host)49 if _netrc:49 # Return with login / password50 return (_netrc[0 if _netrc[0] else 1], _netrc[2])50 # Return with login / password51 login_i = (0 if _netrc[0] else 1)52 return (_netrc[login_i], _netrc[2])53 except NetrcParseError:54 pass5556
400 unmodified lines