Skip to content
Myr

An empty cookiejar evaluates to False, so it needs to be compared to None for the cookie functionality to work.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aram Dulyan · committed by Aram Dulyan · parent a67cc5c · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:requests/core.py+2 added-2 removed
109 unmodified lines
110 """Creates appropriate opener object for urllib2."""111112 _handlers = []113114 if self.cookiejar:114 if self.cookiejar is not None:115 _handlers.append(urllib2.HTTPCookieProcessor(self.cookiejar))116117 if self.auth:118 if not isinstance(self.auth.handler, (urllib2.AbstractBasicAuthHandler, urllib2.AbstractDigestAuthHandler)):
69 unmodified lines
188 try:189 opener = self._get_opener()190 resp = opener(req)191192 if self.cookiejar:192 if self.cookiejar is not None:193 self.cookiejar.extract_cookies(resp, req)194 195 except urllib2.HTTPError, why:196 self._build_response(why)
306 unmodified lines