[Python-checkins] bpo-32586: Fix code example in urllib2's doc (GH-5238)
Mariatta
webhook-mailer at python.org
Thu Jan 18 19:16:16 EST 2018
https://github.com/python/cpython/commit/8ca036d4716fc86ff42474ba35d3cd32f0188a15
commit: 8ca036d4716fc86ff42474ba35d3cd32f0188a15
branch: 2.7
author: Pablo Galindo <Pablogsal at gmail.com>
committer: Mariatta <Mariatta at users.noreply.github.com>
date: 2018-01-18T16:16:13-08:00
summary:
bpo-32586: Fix code example in urllib2's doc (GH-5238)
It should be `urllib2.URLError` instead of just `URLError`.
files:
M Doc/howto/urllib2.rst
diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
index d697c216d8c..ce6394859d5 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')
More information about the Python-checkins
mailing list