summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 39dadbd..1984cf2 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -696,7 +696,7 @@ class AbstractBasicAuthHandler:
def retry_http_basic_auth(self, host, req, realm):
user,pw = self.passwd.find_user_password(realm, host)
- if pw:
+ if pw is not None:
raw = "%s:%s" % (user, pw)
auth = 'Basic %s' % base64.encodestring(raw).strip()
if req.headers.get(self.auth_header, None) == auth: