mirror of https://github.com/python/cpython.git
Skip nntplib tests when transient errors captured.
This commit is contained in:
commit
d09620839c
|
@ -13,6 +13,7 @@
|
|||
import importlib
|
||||
import importlib.util
|
||||
import logging.handlers
|
||||
import nntplib
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
|
@ -1341,6 +1342,10 @@ def filter_error(err):
|
|||
if timeout is not None:
|
||||
socket.setdefaulttimeout(timeout)
|
||||
yield
|
||||
except nntplib.NNTPTemporaryError as err:
|
||||
if verbose:
|
||||
sys.stderr.write(denied.args[0] + "\n")
|
||||
raise denied from err
|
||||
except OSError as err:
|
||||
# urllib can wrap original socket errors multiple times (!), we must
|
||||
# unwrap to get at the original error.
|
||||
|
|
Loading…
Reference in New Issue