Skip to content
Myr

simplify get_auth_from_url call

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 13aeb9c · Browse files · 1 file+4 added−5 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−5 removed

  • other:+4 added−5 removed

1 file+4 added−5 removed

modified:requests/models.py+4 added-5 removed
220 unmodified lines
221 p.prepare_cookies(self.cookies)222 p.prepare_body(self.data, self.files)223 # Note that prepare_auth must be last to enable authentication schemes224 # such as OAuth to work on a fully prepared request.225 if self.auth is None:226 auth = get_auth_from_url(self.url)227 if auth[0] is not None and auth[1] is not None:228 self.auth = auth229 p.prepare_auth(self.auth)225226 embedded_auth = get_auth_from_url(self.url)227 p.prepare_auth(self.auth or embedded_auth)228229 # This MUST go after prepare_auth. Authenticators could add a hook230 p.prepare_hooks(self.hooks)231232 return p
434 unmodified lines