diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-25 21:43:58 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-25 21:43:58 (GMT) |
commit | 6150804397cca2dbd5408e4cbb1fa2e3d224f51c (patch) | |
tree | 7c005bcb4411960dc65e0bf27482c24dcc1e6c72 | |
parent | 2615e9e29309bae509d70039f08b452cd3281700 (diff) | |
download | cpython-6150804397cca2dbd5408e4cbb1fa2e3d224f51c.zip cpython-6150804397cca2dbd5408e4cbb1fa2e3d224f51c.tar.gz cpython-6150804397cca2dbd5408e4cbb1fa2e3d224f51c.tar.bz2 |
handle errors without a reason attribute
-rw-r--r-- | Lib/test/support/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 253f319..d98068c 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 |