From f89a5bcf705c3b78e605b33b8dde244c521bf2e7 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Mon, 8 Aug 2016 15:32:31 -0700 Subject: [PATCH] Use output()/error() instead of print We shouldn't be using print in the core API, with the possible (?) exception of error/abort messages. --- mininet/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mininet/cli.py b/mininet/cli.py index 574e946..a6c26fd 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -373,7 +373,7 @@ class CLI( Cmd ): def do_links( self, _line ): "Report on links" for link in self.mn.links: - print( link, link.status() ) + output( link, link.status() ) def do_switch( self, line ): "Starts or stops a switch" @@ -407,7 +407,7 @@ class CLI( Cmd ): if first in self.mn: if not args: - print( "*** Enter a command for node: %s " % first ) + error( "*** Enter a command for node: %s " % first ) return node = self.mn[ first ] rest = args.split( ' ' )