Dan Kenigsberg has posted comments on this change.
Change subject: utils: allow retry of multiple functions ......................................................................
Patch Set 1: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/36336/1/lib/vdsm/utils.py File lib/vdsm/utils.py:
Line 933: tries -= 1 Line 934: try: Line 935: for func in funcs: Line 936: res = func() Line 937: return res this makes very little sense to me - you ignore the returned value of all but the last function. If an exception is raised, you cannot tell when it was.
A user can easily write a wrapper function that calls the funcs serialy, and pass it to retry.
And most users need to pass a single function anyway. Line 938: except expectedException: Line 939: if tries == 0: Line 940: raise Line 941: