Skip to content
Snippets Groups Projects
Commit 05cce994 authored by Bob Lantz's avatar Bob Lantz
Browse files

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

parent 0a9ea29f
No related branches found
No related tags found
No related merge requests found
......@@ -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."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment