Commit 69f9e911 authored by Benjamin Peterson's avatar Benjamin Peterson

handle errors without a reason attribute

parent ed7300a2
...@@ -488,7 +488,7 @@ def system_must_validate_cert(f): ...@@ -488,7 +488,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 getattr(e, "reason", "") == "CERTIFICATE_VERIFY_FAILED":
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