From 05cce994c32766be722b6a527b7d937031d7ccf4 Mon Sep 17 00:00:00 2001
From: Bob Lantz <rlantz@cs.stanford.edu>
Date: Tue, 15 Dec 2009 19:59:48 -0800
Subject: [PATCH] Haha, retry is definitely not right. Time to take a break I
 think.

---
 mininet.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mininet.py b/mininet.py
index 3704a723..60780bd0 100755
--- a/mininet.py
+++ b/mininet.py
@@ -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."
-- 
GitLab