Don't retry if certificate is not readable
Fixes: https://pagure.io/koji/issue/1108
This commit is contained in:
parent
898de96d4d
commit
0fecbc969b
1 changed files with 4 additions and 3 deletions
|
|
@ -1931,9 +1931,10 @@ def is_requests_cert_error(e):
|
|||
# Using str(e) is slightly ugly, but the error stacks in python-requests
|
||||
# are way more ugly.
|
||||
errstr = str(e)
|
||||
if ('certificate revoked' in errstr or
|
||||
'certificate expired' in errstr or
|
||||
'certificate verify failed' in errstr):
|
||||
if ('Permission denied' in errstr or # certificate not readable
|
||||
'certificate revoked' in errstr or
|
||||
'certificate expired' in errstr or
|
||||
'certificate verify failed' in errstr):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue