diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-25 15:43:58 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-25 15:43:58 -0600 |
commit | 3adbe47f1b00ab2b026850eb190afd940a71e4fd (patch) | |
tree | fd2377c4dc12c0b8bd309e78cd91bd7179a45946 | |
parent | 43ad4563e3a55fa2075deccdec42427343ce0870 (diff) | |
download | cpython-3adbe47f1b00ab2b026850eb190afd940a71e4fd.tar.gz |
handle errors without a reason attribute
-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 539ddb3c6d..add406f769 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 e.reason == "CERTIFICATE_VERIFY_FAILED": + if getattr(e, "reason", "") == "CERTIFICATE_VERIFY_FAILED": raise unittest.SkipTest("system does not contain " "necessary certificates") raise |