merge from 3.2 - reason attribute for urllib.error.HTTPError

This commit is contained in:
Senthil Kumaran 2012-12-09 13:52:31 -08:00
commit 50cdd55af9
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,10 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate:
to a value found in the dictionary of codes as found in to a value found in the dictionary of codes as found in
:attr:`http.server.BaseHTTPRequestHandler.responses`. :attr:`http.server.BaseHTTPRequestHandler.responses`.
.. attribute:: reason
This is usually a string explaining the reason for this error.
.. exception:: ContentTooShortError(msg, content) .. exception:: ContentTooShortError(msg, content)
This exception is raised when the :func:`urlretrieve` function detects that This exception is raised when the :func:`urlretrieve` function detects that