From b8955056252f528c5471b64aea24668a5289ab35 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Thu, 13 Mar 2014 11:33:29 -0400 Subject: whatsnew: HTTPError.headers (#15701). --- Doc/library/urllib.error.rst | 2 +- Doc/whatsnew/3.4.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Doc/library/urllib.error.rst b/Doc/library/urllib.error.rst index 9fb58f5..f7f0c97 100644 --- a/Doc/library/urllib.error.rst +++ b/Doc/library/urllib.error.rst @@ -48,7 +48,7 @@ The following exceptions are raised by :mod:`urllib.error` as appropriate: .. attribute:: headers - The HTTP response headers for the HTTP request that cause the + The HTTP response headers for the HTTP request that caused the :exc:`HTTPError`. .. versionadded:: 3.4 diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 8521353..5644966 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -1627,6 +1627,11 @@ headers from a :class:`~urllib.request.Request`. (Contributed by Alexey Kachayev in :issue:`16464`, Daniel Wozniak in :issue:`17485`, and Damien Brecht and Senthil Kumaran in :issue:`17272`.) +:class:`~urllib.error.HTTPError` objects now have a +:attr:`~urllib.error.HTTPError.headers` attribute that provides access to the +HTTP response headers associated with the error. (Contributed by +Berker Peksag in :issue:`15701`.) + unittest -------- -- cgit v0.12