diff --git a/mininet/link.py b/mininet/link.py index 3bc63ec..a1d1ad9 100644 --- a/mininet/link.py +++ b/mininet/link.py @@ -465,13 +465,13 @@ class Link( object ): def delete( self ): "Delete this link" self.intf1.delete() - # We only need to delete one side, but this doesn't seem to - # cost us anything and may help subclasses. - self.intf2.delete() + # We only need to delete one side, though this doesn't seem to + # cost us much and might help subclasses. + # self.intf2.delete() def stop( self ): "Override to stop and clean up link as needed" - pass + self.delete() def status( self ): "Return link status as a string" diff --git a/mininet/node.py b/mininet/node.py index f263ad0..ffbedec 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -259,7 +259,7 @@ class Node( object ): and return without waiting for the command to complete. args: command and arguments, or string printPid: print command's PID?""" - assert not self.waiting + assert self.shell and not self.waiting printPid = kwargs.get( 'printPid', True ) # Allow sendCmd( [ list ] ) if len( args ) == 1 and isinstance( args[ 0 ], list ): @@ -339,8 +339,11 @@ class Node( object ): verbose = kwargs.get( 'verbose', False ) log = info if verbose else debug log( '*** %s : %s\n' % ( self.name, args ) ) - self.sendCmd( *args, **kwargs ) - return self.waitOutput( verbose ) + if self.shell: + self.sendCmd( *args, **kwargs ) + return self.waitOutput( verbose ) + else: + warn( '(%s exited - ignoring cmd%s)\n' % ( self, args ) ) def cmdPrint( self, *args): """Call cmd and printing its output