From: Jeremy Hylton Date: Mon, 5 May 2003 01:47:13 +0000 (+0000) Subject: Add comment explaining try/except for endheaders(). X-Git-Tag: v2.3c1~856 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6b444ede46fe737fe02799b1b788dc5a3bdc5b4;p=python Add comment explaining try/except for endheaders(). --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 75583e3453..3e700a9d87 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: