Kaydet (Commit) 61508043 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

handle errors without a reason attribute

üst 2615e9e2
...@@ -698,7 +698,7 @@ def system_must_validate_cert(f): ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment