diff options
Diffstat (limited to 'Doc/howto/urllib2.rst')
-rw-r--r-- | Doc/howto/urllib2.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index dfa6d0e..8a3accd 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -313,7 +313,7 @@ geturl, and info, methods as returned by the ``urllib.response`` module:: >>> req = urllib.request.Request('http://www.python.org/fish.html') >>> try: >>> urllib.request.urlopen(req) - >>> except urllib.error.URLError as e: + >>> except urllib.error.HTTPError as e: >>> print(e.code) >>> print(e.read()) >>> |