diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-25 16:12:32 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-25 16:12:32 -0600 |
commit | 9f308a075f873bb14b52ee3f3d12f8430fe62507 (patch) | |
tree | 203ff4768c30c9ffae4f9b402f888eed53721cee | |
parent | 3adbe47f1b00ab2b026850eb190afd940a71e4fd (diff) | |
download | cpython-9f308a075f873bb14b52ee3f3d12f8430fe62507.tar.gz |
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 add406f769..7b831909cf 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 |