From: Benjamin Peterson Date: Tue, 25 Nov 2014 22:12:32 +0000 (-0600) Subject: use more ugly but hopefully more robust method X-Git-Tag: v2.7.9rc1~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7363ed8ef8e3a7a8f5d3f39e244c1b8e14d9005;p=thirdparty%2FPython%2Fcpython.git use more ugly but hopefully more robust method --- diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index add406f769d3..7b831909cfc7 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