Haha, retry is definitely not right. Time to take a break I think.

This commit is contained in:
Bob Lantz
2009-12-15 19:59:48 -08:00
parent 0a9ea29fd2
commit 05cce994c3
+2 -2
View File
@@ -357,11 +357,11 @@ def moveIntf( intf, node ):
def retry( n, fn, *args):
"Try something N times before giving up."
tries = 0
while not apply( fn, args ) and tries < 3:
while not apply( fn, args ) and tries < n:
sleep( 1 )
print "*** retrying..."; flush()
tries += 1
if tries > 3: exit( 1 )
if tries >= n: exit( 1 )
def createLink( node1, node2 ):
"Create a link node1-intf1 <---> node2-intf2."