refactor: ignore MaxRetryError where HTTPError is ignored
This commit is contained in:
parent
e2560e074f
commit
d7af4257c8
@ -15,6 +15,7 @@ from lxml import etree as ET
|
||||
|
||||
import osc.conf
|
||||
import osc.core
|
||||
from urllib3.exceptions import MaxRetryError
|
||||
from osclib.core import devel_project_get
|
||||
from osclib.core import devel_project_fallback
|
||||
from osclib.core import entity_exists
|
||||
@ -565,6 +566,8 @@ class CheckSource(ReviewBot.ReviewBot):
|
||||
return True
|
||||
except HTTPError:
|
||||
pass
|
||||
except MaxRetryError:
|
||||
pass
|
||||
return False
|
||||
|
||||
def check_action_add_role(self, request, action):
|
||||
@ -586,6 +589,8 @@ class CheckSource(ReviewBot.ReviewBot):
|
||||
root = ET.fromstring(result)
|
||||
except HTTPError:
|
||||
return None
|
||||
except MaxRetryError:
|
||||
return None
|
||||
|
||||
# Decline the delete request if there is another delete/submit request against the same package
|
||||
query = "match=state/@name='new'+and+(action/target/@project='{}'+and+action/target/@package='{}')"\
|
||||
|
Loading…
x
Reference in New Issue
Block a user