[issue12576] urlib.request fails to open some sites

Senthil Kumaran report at bugs.python.org
Mon Jul 25 02:04:35 CEST 2011


Senthil Kumaran <senthil at uthcode.com> added the comment:

I propose the attached patch as fix to this issue. All it does is, moves the code of getting http response to the finally block of the http request. It closes the sockets if the getting the response fails for some reason, otherwise it proceeds normally.  

Please provide your critique if any, otherwise, I shall go ahead with checking this in.

----------
keywords: +patch
Added file: http://bugs.python.org/file22746/issue12576.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12576>
_______________________________________


More information about the Python-bugs-list mailing list