Skip to content
Myr

catch cookie errors that are prone to failure

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 0a1e527 · Browse files · 1 file+9 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+9 added−4 removed

  • other:+9 added−4 removed

1 file+9 added−4 removed

modified:requests/utils.py+9 added-4 removed
12 unmodified lines
13import codecs14import os15import random16import re17import traceback18import zlib19from netrc import netrc, NetrcParseError2021from .compat import parse_http_list as _parse_list_header
39 unmodified lines
61 """Returns a MultiDict with Cookies."""6263 cookies = dict()6465 try:64 c = SimpleCookie()65 c.load(s)66 c = SimpleCookie()67 c.load(s)6867 for k, v in list(c.items()):68 cookies.update({k: v.value})69 for k, v in list(c.items()):70 cookies.update({k: v.value})71 # This stuff is not to be trusted.72 except Exception:73 pass7475 return cookies7677
386 unmodified lines