diff --git a/mininet/mininet.py b/mininet/mininet.py index 6da7ba802ecb4cf5cc8cf2c2a03e1d0bbdc73536..36a48bfb52bac59e45458d959b6a39f8727cec36 100755 --- a/mininet/mininet.py +++ b/mininet/mininet.py @@ -399,7 +399,13 @@ def moveIntf( intf, node, print_error = False ): return True def retry( n, retry_delay, fn, *args): - "Try something N times before giving up." + '''Try something N times before giving up. + + @param n number of times to retry + @param retry_delay seconds wait this long between tries + @param fn function to call + @param args args to apply to function call + ''' tries = 0 while not apply( fn, args ) and tries < n: sleep( retry_delay )