Fixing retries.py so that it works in py3
This commit is contained in:
parent
ba6c6182ed
commit
d340ed5dc8
3
third_party/retries/retries.py
vendored
3
third_party/retries/retries.py
vendored
@ -61,8 +61,7 @@ def retries(max_tries, delay=1, backoff=2, exceptions=(Exception,), hook=None):
|
|||||||
def dec(func):
|
def dec(func):
|
||||||
def f2(*args, **kwargs):
|
def f2(*args, **kwargs):
|
||||||
mydelay = delay
|
mydelay = delay
|
||||||
tries = range(max_tries)
|
tries = reversed(range(max_tries))
|
||||||
tries.reverse()
|
|
||||||
for tries_remaining in tries:
|
for tries_remaining in tries:
|
||||||
try:
|
try:
|
||||||
return func(*args, **kwargs)
|
return func(*args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user