Moved waitForNode. Maybe candidate for util.py or static method...

This commit is contained in:
Bob Lantz
2010-03-24 17:21:57 -07:00
parent c2cc1aacf6
commit e91b2815fa
+13 -10
View File
@@ -36,16 +36,6 @@ from cmd import Cmd
from mininet.log import info, output, error
def waitForNode( node ):
"Wait for a node to finish, and print its output."
while node.waiting:
try:
data = node.monitor()
info( '%s' % data )
except KeyboardInterrupt:
node.sendInt()
class CLI( Cmd ):
"Simple command-line interface to talk to nodes."
@@ -228,3 +218,16 @@ class CLI( Cmd ):
self.stdout.write( '*** Unknown syntax: %s\n' % line )
# pylint: enable-msg=W0613,R0201
# This function may be a candidate for util.py
def waitForNode( node ):
"Wait for a node to finish, and print its output."
while node.waiting:
try:
data = node.monitor()
info( '%s' % data )
except KeyboardInterrupt:
node.sendInt()