From: Georg Brandl Date: Fri, 4 Sep 2009 08:17:04 +0000 (+0000) Subject: Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as docum... X-Git-Tag: v2.7a1~588 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d22b9519d120d3a6a678f516c1ee020601c3ac3a;p=python Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. --- diff --git a/Lib/Cookie.py b/Lib/Cookie.py index 1ccfd160a4..fc6d9f61b6 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() diff --git a/Misc/NEWS b/Misc/NEWS index eea32c1a90..b517b978cf 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -364,6 +364,9 @@ Core and Builtins Library ------- +- Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments + as documented. + - Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module.