Replaced stdout.write() with output()

This commit is contained in:
Bob Lantz
2010-04-12 18:45:43 -07:00
parent c16679863b
commit e555f83c97
+3 -3
View File
@@ -98,7 +98,7 @@ class CLI( Cmd ):
' mininet> xterm h2\n\n' ' mininet> xterm h2\n\n'
) )
if args is '': if args is '':
self.stdout.write( helpStr ) output( helpStr )
def do_nodes( self, args ): def do_nodes( self, args ):
"List all nodes." "List all nodes."
@@ -238,7 +238,7 @@ class CLI( Cmd ):
node.sendCmd( rest ) node.sendCmd( rest )
self.waitForNode( node, isShellBuiltin( first ) ) self.waitForNode( node, isShellBuiltin( first ) )
else: else:
self.stdout.write( '*** Unknown command: %s\n' % first ) error( '*** Unknown command: %s\n' % first )
# pylint: enable-msg=W0613,R0201 # pylint: enable-msg=W0613,R0201
@@ -268,7 +268,7 @@ class CLI( Cmd ):
node.write( key ) node.write( key )
if self.isReadable( nodePoller ): if self.isReadable( nodePoller ):
data = node.monitor() data = node.monitor()
output( '%s' % data ) output( data )
if not node.waiting: if not node.waiting:
break break
except KeyboardInterrupt: except KeyboardInterrupt: