mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
handle errors without a reason attribute
This commit is contained in:
parent
2615e9e293
commit
6150804397
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue