From bfb0989ea738b2fc7e79de4907b02d8a964a4960 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 9 Dec 2012 13:36:40 -0800 Subject: [PATCH] Document the reason attribute of urllib.HTTPError Patch by Berker Peksag --- Doc/library/urllib2.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index 1121e5fbfce..39d39dbda7c 100644 --- a/Doc/library/urllib2.rst +++ b/Doc/library/urllib2.rst @@ -121,7 +121,10 @@ The following exceptions are raised as appropriate: This numeric value corresponds to a value found in the dictionary of codes as found in :attr:`BaseHTTPServer.BaseHTTPRequestHandler.responses`. + .. attribute:: reason + The reason for this error. It can be a message string or another exception + instance. The following classes are provided: