summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-25 22:12:32 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-11-25 22:12:32 (GMT)
commitf7363ed8ef8e3a7a8f5d3f39e244c1b8e14d9005 (patch)
treeaf7155deba5aa821077a59a1370da7dc4ebced5d
parent69a64d3fc21f173211ee2139a718bc8869abf2f1 (diff)
downloadcpython-f7363ed8ef8e3a7a8f5d3f39e244c1b8e14d9005.zip
cpython-f7363ed8ef8e3a7a8f5d3f39e244c1b8e14d9005.tar.gz
cpython-f7363ed8ef8e3a7a8f5d3f39e244c1b8e14d9005.tar.bz2
use more ugly but hopefully more robust method
-rw-r--r--Lib/test/test_support.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index add406f..7b83190 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -488,7 +488,7 @@ def system_must_validate_cert(f):
try:
f(*args, **kwargs)
except IOError as e:
- if getattr(e, "reason", "") == "CERTIFICATE_VERIFY_FAILED":
+ if "CERTIFICATE_VERIFY_FAILED" in str(e):
raise unittest.SkipTest("system does not contain "
"necessary certificates")
raise