Skip to content
Myr

Consistent self.cookies usage

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

This avoids two variables pointing to the same thing and avoids a duplicate dict update() call

authored by Chris Adams · committed by Chris Adams · parent 49bed18 · Browse files · 1 file+2 added−3 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+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:requests/models.py+2 added-3 removed
201 unmodified lines
202203 history = []204205 r = build(resp)206 cookies = self.cookies206207 self.cookies.update(r.cookies)208209 if r.status_code in REDIRECT_STATI and not self.redirect:210 while (('location' in r.headers) and
35 unmodified lines
246 files=self.files,247 method=method,248 params=self.session.params,249 auth=self.auth,250 cookies=cookies,250 cookies=self.cookies,251 redirect=True,252 config=self.config,253 timeout=self.timeout,254 _poolmanager=self._poolmanager,
2 unmodified lines
257 session = self.session258 )259260 request.send()261 cookies.update(request.response.cookies)261 r = request.response262 self.cookies.update(r.cookies)263264 r.history = history
536 unmodified lines