Commit d0962083 authored by Berker Peksag's avatar Berker Peksag

Skip nntplib tests when transient errors captured.

parents 716b3d3e 52c0c338
......@@ -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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment