get cookie like dict, such as self.cookies.get('test', 'no cookie')

This commit is contained in:
ben
2012-05-10 22:17:23 +08:00
parent 2d328d8a7f
commit 44663b5e8e
+1 -1
View File
@@ -140,7 +140,7 @@ class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
Unlike a regular CookieJar, this class is pickleable.
"""
def get(self, name, domain=None, path=None, default=None):
def get(self, name, default=None, domain=None, path=None):
try:
return self._find(name, domain, path)
except KeyError: