Don't look through all interfaces if you don't need to.

This commit is contained in:
Bob Lantz
2014-03-06 17:52:41 -08:00
parent 2e19ceb0aa
commit d82900d3a8
+1 -2
View File
@@ -188,8 +188,7 @@ def moveIntfNoRetry( intf, dstNode, srcNode=None, printError=False ):
srcNode.cmd( cmd )
else:
quietRun( cmd )
links = dstNode.cmd( 'ip link show' )
if not ( ' %s:' % intf ) in links:
if ( ' %s:' % intf ) not in dstNode.cmd( 'ip link show', intf ):
if printError:
error( '*** Error: moveIntf: ' + intf +
' not successfully moved to ' + dstNode.name + '\n' )