Revision 9db6cdc2 mininet/node.py

View differences:

mininet/node.py
259 259
           and return without waiting for the command to complete.
260 260
           args: command and arguments, or string
261 261
           printPid: print command's PID?"""
262
        assert not self.waiting
262
        assert self.shell and not self.waiting
263 263
        printPid = kwargs.get( 'printPid', True )
264 264
        # Allow sendCmd( [ list ] )
265 265
        if len( args ) == 1 and isinstance( args[ 0 ], list ):
......
339 339
        verbose = kwargs.get( 'verbose', False )
340 340
        log = info if verbose else debug
341 341
        log( '*** %s : %s\n' % ( self.name, args ) )
342
        self.sendCmd( *args, **kwargs )
343
        return self.waitOutput( verbose )
342
        if self.shell:
343
            self.sendCmd( *args, **kwargs )
344
            return self.waitOutput( verbose )
345
        else:
346
            warn( '(%s exited - ignoring cmd%s)\n' % ( self, args ) )
344 347

  
345 348
    def cmdPrint( self, *args):
346 349
        """Call cmd and printing its output

Also available in: Unified diff