Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 50cdd55

Browse files
committed
merge from 3.2 - reason attribute for urllib.error.HTTPError
2 parents 4b7743a + 2e72831 commit 50cdd55

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Doc/library/urllib.error.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate:
4141
to a value found in the dictionary of codes as found in
4242
:attr:`http.server.BaseHTTPRequestHandler.responses`.
4343

44+
.. attribute:: reason
45+
46+
This is usually a string explaining the reason for this error.
47+
4448
.. exception:: ContentTooShortError(msg, content)
4549

4650
This exception is raised when the :func:`urlretrieve` function detects that

0 commit comments

Comments
 (0)