summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-04 08:17:04 (GMT)
committerGeorg Brandl <georg@python.org>2009-09-04 08:17:04 (GMT)
commitd22b9519d120d3a6a678f516c1ee020601c3ac3a (patch)
treeb2b27c9b913694f3c5caf8ee407e7fc07275951c /Lib
parentfe18a11858d73189fee6e1677111471ba2437848 (diff)
downloadcpython-d22b9519d120d3a6a678f516c1ee020601c3ac3a.zip
cpython-d22b9519d120d3a6a678f516c1ee020601c3ac3a.tar.gz
cpython-d22b9519d120d3a6a678f516c1ee020601c3ac3a.tar.bz2
Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/Cookie.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/Cookie.py b/Lib/Cookie.py
index 1ccfd16..fc6d9f6 100644
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -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()