Skip to content

Commit 8ca036d

Browse files
pablogsalMariatta
authored andcommitted
bpo-32586: Fix code example in urllib2's doc (GH-5238)
It should be `urllib2.URLError` instead of just `URLError`.
1 parent b1a52b1 commit 8ca036d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/howto/urllib2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ e.g. ::
203203

204204
>>> req = urllib2.Request('http://www.pretend_server.org')
205205
>>> try: urllib2.urlopen(req)
206-
... except URLError as e:
206+
... except urllib2.URLError as e:
207207
... print e.reason #doctest: +SKIP
208208
...
209209
(4, 'getaddrinfo failed')

0 commit comments

Comments
 (0)