Skip to content
Myr

Push code review advice from @sigmavirus24

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

authored by Cory Benfield · committed by Cory Benfield · parent 589f13c · Browse files · 1 file+5 added−4 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+5 added−4 removed

  • other:+5 added−4 removed

1 file+5 added−4 removed

modified:requests/utils.py+5 added-4 removed
113 unmodified lines
114 return115116 ri = urlparse(url)117118 # Strip port numbers from netloc118 # Strip port numbers from netloc. This weird `if...encode`` dance is119 # used for Python 3.2, which doesn't support unicode literals.120 splitstr = b':'121 if isinstance(url, str):120 host = ri.netloc.split(u':')[0]121 else:122 host = ri.netloc.split(b':')[0]122 splitstr = splitstr.decode('ascii')123 host = ri.netloc.split(splitstr)[0]124125 try:126 _netrc = netrc(netrc_path).authenticators(host)127 if _netrc:
594 unmodified lines