diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-25 22:12:32 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-25 22:12:32 (GMT) |
commit | f7363ed8ef8e3a7a8f5d3f39e244c1b8e14d9005 (patch) | |
tree | af7155deba5aa821077a59a1370da7dc4ebced5d | |
parent | 69a64d3fc21f173211ee2139a718bc8869abf2f1 (diff) | |
download | cpython-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.py | 2 |
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 |