summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-25 21:43:58 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-25 21:43:58 (GMT)
commit6150804397cca2dbd5408e4cbb1fa2e3d224f51c (patch)
tree7c005bcb4411960dc65e0bf27482c24dcc1e6c72
parent2615e9e29309bae509d70039f08b452cd3281700 (diff)
downloadcpython-6150804397cca2dbd5408e4cbb1fa2e3d224f51c.zip
cpython-6150804397cca2dbd5408e4cbb1fa2e3d224f51c.tar.gz
cpython-6150804397cca2dbd5408e4cbb1fa2e3d224f51c.tar.bz2
handle errors without a reason attribute
-rw-r--r--Lib/test/support/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 253f319..d98068c 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -698,7 +698,7 @@ def system_must_validate_cert(f):
try:
f(*args, **kwargs)
except IOError as e:
- if e.reason == "CERTIFICATE_VERIFY_FAILED":
+ if "CERTIFICATE_VERIFY_FAILED" in str(e):
raise unittest.SkipTest("system does not contain "
"necessary certificates")
raise