Revision b9100834

View differences:

mininet/node.py
297 297
            elif type( args[ 0 ] ) is str:
298 298
                # popen("cmd arg1 arg2...")
299 299
                cmd = args[ 0 ].split()
300
            else:
301
                raise Exception( 'popen() requires a string or list' )
300 302
        elif len( args ) > 0:
301 303
            # popen( cmd, arg1, arg2... )
302 304
            cmd = args
......
304 306
        mncmd = defaults[ 'mncmd' ]
305 307
        del defaults[ 'mncmd' ]
306 308
        cmd = mncmd + cmd
309
        # Shell requires a string, not a list!
310
        if defaults.get( 'shell', False ):
311
            cmd = ' '.join( cmd )
307 312
        return Popen( cmd, **defaults )
308 313

  
309 314
    def pexec( self, *args, **kwargs ):

Also available in: Unified diff