mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +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:
|
try:
|
||||||
f(*args, **kwargs)
|
f(*args, **kwargs)
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
if e.reason == "CERTIFICATE_VERIFY_FAILED":
|
if "CERTIFICATE_VERIFY_FAILED" in str(e):
|
||||||
raise unittest.SkipTest("system does not contain "
|
raise unittest.SkipTest("system does not contain "
|
||||||
"necessary certificates")
|
"necessary certificates")
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue