From 6150804397cca2dbd5408e4cbb1fa2e3d224f51c Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 25 Nov 2014 15:43:58 -0600 Subject: handle errors without a reason attribute --- Lib/test/support/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test') diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 253f319c13..d98068cac8 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 -- cgit v1.2.1