[New-bugs-announce] [issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client

Jyotirmoy Bhattacharya report at bugs.python.org
Sun Jan 8 07:22:20 CET 2012


New submission from Jyotirmoy Bhattacharya <jyotirmoy at jyotirmoy.net>:

The documentation for urlopen says that it raises URLError on error. 
But there exist error conditions such as a socket timeout or a bad HTTP status line under which the exception from the underlying library leaks through urllib, thus breaking the promise in the documentation.

I am attaching a test program that demonstrates this bug.

----------
components: Library (Lib)
files: test_urllib_except.py
messages: 150849
nosy: jmoy, orsenthil
priority: normal
severity: normal
status: open
title: urllib.request.urlopen leaks exceptions from socket and httplib.client
versions: Python 3.3
Added file: http://bugs.python.org/file24172/test_urllib_except.py

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


More information about the New-bugs-announce mailing list