summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-04-08 08:24:27 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-04-08 08:24:27 (GMT)
commit52c0c3382d95a8a4877a5dfaaacf61b436f0b1bf (patch)
treedb8d25852840732fbaf95b33dde540a3da801bfd
parentc9d11c341e0e140cb71fab6699fc1b49d8f35436 (diff)
downloadcpython-52c0c3382d95a8a4877a5dfaaacf61b436f0b1bf.zip
cpython-52c0c3382d95a8a4877a5dfaaacf61b436f0b1bf.tar.gz
cpython-52c0c3382d95a8a4877a5dfaaacf61b436f0b1bf.tar.bz2
Skip nntplib tests when transient errors captured.
-rw-r--r--Lib/test/support/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 1ec3178..01ca2f8 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
@@ -1340,6 +1341,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.