Remove no longer needed tenacity workarounds

Now that we have packaged tenacity 6.2 for debian buster and use it
in production, we can remove the workarounds to support tenacity < 5.
This commit is contained in:
Antoine Lambert 2021-12-08 11:39:17 +01:00
parent fa7ecc8fbd
commit 445d539b3f
5 changed files with 8 additions and 28 deletions

View file

@ -13,7 +13,7 @@ from xmlrpc.client import Fault, ServerProxy
from tenacity.before_sleep import before_sleep_log
from swh.lister.utils import retry_attempt, throttling_retry
from swh.lister.utils import throttling_retry
from swh.scheduler.interface import SchedulerInterface
from swh.scheduler.model import ListedOrigin
@ -49,7 +49,7 @@ def _if_rate_limited(retry_state) -> bool:
in 1 seconds.'>
"""
attempt = retry_attempt(retry_state)
attempt = retry_state.outcome
return attempt.failed and isinstance(attempt.exception(), Fault)