diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2015-04-08 08:24:51 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2015-04-08 08:24:51 (GMT) |
commit | d09620839c3295d2b912c193cfc5a920d17f88cd (patch) | |
tree | 3a999512c844e0ced93947ba594cb1f9f10bc10f /Lib | |
parent | 716b3d3e9137aeeed4ee3480a5302c54442405b6 (diff) | |
parent | 52c0c3382d95a8a4877a5dfaaacf61b436f0b1bf (diff) | |
download | cpython-d09620839c3295d2b912c193cfc5a920d17f88cd.zip cpython-d09620839c3295d2b912c193cfc5a920d17f88cd.tar.gz cpython-d09620839c3295d2b912c193cfc5a920d17f88cd.tar.bz2 |
Skip nntplib tests when transient errors captured.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/support/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 78d386f..0495121 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -13,6 +13,7 @@ import gc import importlib import importlib.util import logging.handlers +import nntplib import os import platform import re @@ -1341,6 +1342,10 @@ def transient_internet(resource_name, *, timeout=30.0, errnos=()): 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. |