Ezio Melotti added the comment: + >>> try: + ... urllib.request.urlopen(req) + ... except urllib.error.URLError as e: + ... print("Error opening url.") + ... # E.g. "[Errno 8] nodename nor servname provided, or not known" + ... print("Reason:", e.reason) #doctest: +ELLIPSIS + Error opening url. + Reason: ...
I think the previous version was clearer, so maybe this should be a skip. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15922> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com