summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-05-05 01:47:13 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-05-05 01:47:13 (GMT)
commitf6b444ede46fe737fe02799b1b788dc5a3bdc5b4 (patch)
tree07b9e066bfaedf7ff08028f2d4c242e2b04b8bcb /Lib
parent828023b6b5d4d84a3fc01e9907142662a33d45a6 (diff)
downloadcpython-f6b444ede46fe737fe02799b1b788dc5a3bdc5b4.zip
cpython-f6b444ede46fe737fe02799b1b788dc5a3bdc5b4.tar.gz
cpython-f6b444ede46fe737fe02799b1b788dc5a3bdc5b4.tar.bz2
Add comment explaining try/except for endheaders().
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 75583e3..3e700a9 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -817,6 +817,8 @@ class AbstractHTTPHandler(BaseHandler):
h.putheader(*args)
for k, v in req.headers.items():
h.putheader(k, v)
+ # httplib will attempt to connect() here. be prepared
+ # to convert a socket error to a URLError.
try:
h.endheaders()
except socket.error, err: