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

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

parent 2e19ceb0
No related branches found
No related tags found
No related merge requests found
......@@ -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' )
......
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