Mike Frysinger has posted comments on this change.
Change subject: Rework RetryCommand so it's usable beyond just RunCommand targets.
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(8 inline comments)
....................................................
File lib/cros_build_lib.py
Line 1524: functor(*args, **kwds). If it returns True, then a retry
well, it has to return something that evaluates to true and not exactly "True" ... but i don't think we've been that pedantic in our documentation in the past
Line 1527: non-excepting invocations of functor(*args, **kwds)
should have a period at the end here
Line 1556: stopper = lambda x:False
space after the colon ?
Line 1557: return_handler = stopper if return_handler is None else return_handler
hard to say if this is easier to read than just:
if not return_handler:
return_handler = stopper
or:
return_handler = return_handler or stopper
not sure there's any case where a function would evaluate to false
Line 1568: except TerminateRunCommandError:
shouldn't this be in RetryCommand() in the do_retry handler ?
Line 1598:
needs two blank lines
Line 1607: that is given the raise exception. If the raise exception
raise->raised
Line 1618:
needs two blank lines
Gerrit-MessageType: comment
Gerrit-Change-Id: I117e399c34d16d86f3df6b7eac878e15be025d9e
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/chromite
Gerrit-Branch: master
Gerrit-Owner: Brian Harring <
ferr...@chromium.org>
Gerrit-Reviewer: Mike Frysinger <
vap...@chromium.org>
Gerrit-Reviewer: Ryan Cui <
rc...@chromium.org>