From 8ca036d4716fc86ff42474ba35d3cd32f0188a15 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Fri, 19 Jan 2018 00:16:13 +0000 Subject: [PATCH] bpo-32586: Fix code example in urllib2's doc (GH-5238) It should be `urllib2.URLError` instead of just `URLError`. --- Doc/howto/urllib2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index d697c216d8..ce6394859d 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -203,7 +203,7 @@ e.g. :: >>> req = urllib2.Request('http://www.pretend_server.org') >>> try: urllib2.urlopen(req) - ... except URLError as e: + ... except urllib2.URLError as e: ... print e.reason #doctest: +SKIP ... (4, 'getaddrinfo failed') -- 2.50.0