From f6b444ede46fe737fe02799b1b788dc5a3bdc5b4 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Mon, 5 May 2003 01:47:13 +0000 Subject: Add comment explaining try/except for endheaders(). --- Lib/urllib2.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit v0.12