From: Pablo Galindo Date: Fri, 19 Jan 2018 00:16:13 +0000 (+0000) Subject: bpo-32586: Fix code example in urllib2's doc (GH-5238) X-Git-Tag: v2.7.15rc1~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ca036d4716fc86ff42474ba35d3cd32f0188a15;p=python bpo-32586: Fix code example in urllib2's doc (GH-5238) It should be `urllib2.URLError` instead of just `URLError`. --- 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')