Irit Katriel <[email protected]> added the comment:
Reproduced on 3.11:
>>> from urllib.request import urlopen
>>> try:
... urlopen('http://www.pythonfoobarbaz.org')
... except Exception as exc:
... err = exc
... print('err:', err)
... print('repr(err):', repr(err))
... print('err.errno:', err.errno)
... print('err.strerror:', err.strerror)
... print('err.reason:', err.reason)
... print('err.reason.errno:', err.reason.errno)
... print('err.reason.strerror:', err.reason.strerror)
...
err: <urlopen error [Errno 8] nodename nor servname provided, or not known>
repr(err): URLError(gaierror(8, 'nodename nor servname provided, or not known'))
err.errno: None
err.strerror: None
err.reason: [Errno 8] nodename nor servname provided, or not known
err.reason.errno: 8
err.reason.strerror: nodename nor servname provided, or not known
----------
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python
3.1, Python 3.2
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue6471>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com