Replaced stdout.write() with output()
This commit is contained in:
+3
-3
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user