From 9f308a075f873bb14b52ee3f3d12f8430fe62507 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 25 Nov 2014 16:12:32 -0600 Subject: use more ugly but hopefully more robust method --- Lib/test/test_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1