Use output()/error() instead of print
We shouldn't be using print in the core API, with the possible (?) exception of error/abort messages.
This commit is contained in:
+2
-2
@@ -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 <cmd>" % first )
|
||||
error( "*** Enter a command for node: %s <cmd>" % first )
|
||||
return
|
||||
node = self.mn[ first ]
|
||||
rest = args.split( ' ' )
|
||||
|
||||
Reference in New Issue
Block a user