From 67516aa44f0f3e32f4fa241642fc799e1c9b90f5 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 24 Mar 2010 16:58:44 -0700 Subject: [PATCH] Change run() to allow running external functions. --- mininet/net.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/net.py b/mininet/net.py index 4eb5c1a..57e1d56 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -375,11 +375,11 @@ class Mininet( object ): controller.stop() info( '*** Test complete\n' ) - def run( self, test, **params ): + def run( self, test, *args, **kwargs ): "Perform a complete start/test/stop cycle." self.start() info( '*** Running test\n' ) - result = getattr( self, test )( **params ) + result = test( *args, **kwargs ) self.stop() return result