Skip to content
Myr

fix crash in safe mode when response.cookies is None

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

authored by Shivaram Lingamneni · committed by Shivaram Lingamneni · parent 41d1a42 · 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/sessions.py+4 added-2 removed
227 unmodified lines
228 # Send the HTTP Request.229 r.send(prefetch=prefetch)230231 # Send any cookies back up the to the session.232 # (in safe mode, cookies may be None if the request didn't succeed)233 if r.response.cookies is not None:232 for cookie in r.response.cookies:233 self.cookies.set_cookie(cookie)234 for cookie in r.response.cookies:235 self.cookies.set_cookie(cookie)236237 # Return the response.238 return r.response239
90 unmodified lines