p4fastimport we must return the value from the function we are decorating

We must correctly return the value from the function we are decorating.

Test Plan:
run tests

Differential Revision: https://phab.mercurial-scm.org/D767
This commit is contained in:
David Soria Parra 2017-09-25 15:34:17 -07:00
parent 3190a73f03
commit 11a84b900f

View File

@ -18,8 +18,7 @@ def retry(num=3, sleeps=.3):
def wrapper(*args, **kwargs):
for _try in range(1, num + 1):
try:
function(*args, **kwargs)
return
return function(*args, **kwargs)
except Exception:
if _try == num:
raise