add another pattern to is_requests_cert_error()

This commit is contained in:
Mike McLean 2016-12-08 16:19:56 -05:00
parent 8d3a736637
commit a12f26b07d

View file

@ -1852,8 +1852,10 @@ def is_requests_cert_error(e):
# Using str(e) is slightly ugly, but the error stacks in python-requests
# are way more ugly.
if ('certificate revoked' in str(e) or
'certificate expired' in str(e)):
errstr = str(e)
if ('certificate revoked' in errstr or
'certificate expired' in errstr or
'certificate verify failed' in errstr):
return True
return False