From 41a54f05cbbcb7eee6035285e9a3a544ef91127b Mon Sep 17 00:00:00 2001
From: cody burkard <cody@onlab.us>
Date: Wed, 13 Aug 2014 17:33:00 -0700
Subject: [PATCH] adding comments and removing random access spaces

---
 mininet/link.py | 1 +
 mininet/net.py  | 2 +-
 mininet/node.py | 2 +-
 mininet/util.py | 2 ++
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/mininet/link.py b/mininet/link.py
index 44c590b4..b1dfbfcf 100644
--- a/mininet/link.py
+++ b/mininet/link.py
@@ -122,6 +122,7 @@ def isUp( self, setUp=False ):
         "Return whether interface is up"
         if setUp:
             cmdOutput = self.ifconfig( 'up' )
+            # no output indicates success
             if cmdOutput:
                 error( "Error setting %s up: %s " % ( self.name, cmdOutput ) )
                 return False
diff --git a/mininet/net.py b/mininet/net.py
index 2d44af31..d082b00d 100755
--- a/mininet/net.py
+++ b/mininet/net.py
@@ -384,7 +384,7 @@ def buildFromTopo( self, topo=None ):
             srcPort, dstPort = topo.port( srcName, dstName )
             self.addLink( src, dst, srcPort, dstPort, **params )
             info( '(%s, %s) ' % ( src.name, dst.name ) )
-        
+
         info( '\n' )
 
     def configureControlNetwork( self ):
diff --git a/mininet/node.py b/mininet/node.py
index 333dfe70..b4c00134 100644
--- a/mininet/node.py
+++ b/mininet/node.py
@@ -1190,7 +1190,7 @@ def start( self, controllers ):
         args.append( self.opts )
 
         logfile = '/tmp/ivs.%s.log' % self.name
-        
+
         self.cmd( ' '.join(args) + ' >' + logfile + ' 2>&1 </dev/null &' )
 
     def stop( self ):
diff --git a/mininet/util.py b/mininet/util.py
index b1dc4920..69d31273 100644
--- a/mininet/util.py
+++ b/mininet/util.py
@@ -192,6 +192,8 @@ def moveIntfNoRetry( intf, dstNode, srcNode=None, printError=False ):
         cmdOutput = srcNode.cmd( cmd )
     else:
         cmdOutput = quietRun( cmd )
+    # If ip link set does not produce any output, then we can assume
+    # that the link has been moved successfully.
     if cmdOutput:
         if printError:
             error( '*** Error: moveIntf: ' + intf +
-- 
GitLab