From: Chase Sterling Date: Fri, 15 Feb 2013 03:52:31 +0000 (-0500) Subject: Remove ability to from RequestCookieJar __getitem__, __setitem__ to use cookies as... X-Git-Tag: v1.2.0~42^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3393fb24cc74e9e9aff643e16e0480fcced6ba3;p=services%2Fpython-requests.git Remove ability to from RequestCookieJar __getitem__, __setitem__ to use cookies as keys --- diff --git a/requests/cookies.py b/requests/cookies.py index 365728a..856258c 100644 --- a/requests/cookies.py +++ b/requests/cookies.py @@ -240,8 +240,6 @@ class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): """Dict-like __getitem__() for compatibility with client code. Throws exception if there are more than one cookie with name. In that case, use the more explicit get() method instead. Caution: operation is O(n), not O(1).""" - if isinstance(name, cookielib.Cookie): - name = name.name return self._find_no_duplicates(name) @@ -249,8 +247,6 @@ class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping): """Dict-like __setitem__ for compatibility with client code. Throws exception if there is already a cookie of that name in the jar. In that case, use the more explicit set() method instead.""" - if isinstance(name, cookielib.Cookie): - name = name.name self.set(name, value)