mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented.
This commit is contained in:
parent
fe18a11858
commit
d22b9519d1
2 changed files with 6 additions and 1 deletions
|
@ -624,7 +624,9 @@ class BaseCookie(dict):
|
|||
if type(rawdata) == type(""):
|
||||
self.__ParseString(rawdata)
|
||||
else:
|
||||
self.update(rawdata)
|
||||
# self.update() wouldn't call our custom __setitem__
|
||||
for k, v in rawdata.items():
|
||||
self[k] = v
|
||||
return
|
||||
# end load()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue