Skip to content

Commit

Permalink
Merge pull request #1790 from r-lindner/set_function_name
Browse files Browse the repository at this point in the history
Thank you for catching this!
  • Loading branch information
David Marin committed May 30, 2018
2 parents a954048 + c75e3cf commit 6e340f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mrjob/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def call_and_maybe_retry(*args, **kwargs):
backoff = self.__backoff
tries = 0

while (not self.__max_tries or tries < self.__max_tries):
while not self.__max_tries or tries < self.__max_tries:
try:
return f(*args, **kwargs)
except Exception as ex:
Expand All @@ -96,5 +96,5 @@ def call_and_maybe_retry(*args, **kwargs):

# pretend to be the original function
if hasattr(f, '__name__'):
call_and_maybe_retry.__name__ == f.__name__
call_and_maybe_retry.__name__ = f.__name__
return call_and_maybe_retry

0 comments on commit 6e340f3

Please sign in to comment.