Fix indentation errors.
This commit is contained in:
@@ -19,15 +19,15 @@ def pmonitorTest( N=3, seconds=10 ):
|
|||||||
popens = {}
|
popens = {}
|
||||||
for h in hosts:
|
for h in hosts:
|
||||||
popens[ h ] = h.popen('ping', server.IP() )
|
popens[ h ] = h.popen('ping', server.IP() )
|
||||||
print "Monitoring output for", seconds, "seconds"
|
print "Monitoring output for", seconds, "seconds"
|
||||||
endTime = time() + seconds
|
endTime = time() + seconds
|
||||||
for h, line in pmonitor( popens, timeoutms=500 ):
|
for h, line in pmonitor( popens, timeoutms=500 ):
|
||||||
if h:
|
if h:
|
||||||
print '%s: %s' % ( h.name, line ),
|
print '%s: %s' % ( h.name, line ),
|
||||||
if time() >= endTime:
|
if time() >= endTime:
|
||||||
for p in popens.values():
|
for p in popens.values():
|
||||||
p.send_signal( SIGINT )
|
p.send_signal( SIGINT )
|
||||||
net.stop()
|
net.stop()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
pmonitorTest()
|
pmonitorTest()
|
||||||
|
|||||||
Reference in New Issue
Block a user