Fix undefined sleep()
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@ import time
|
|||||||
from mininet.log import info
|
from mininet.log import info
|
||||||
from mininet.term import cleanUpScreens
|
from mininet.term import cleanUpScreens
|
||||||
|
|
||||||
|
|
||||||
def sh( cmd ):
|
def sh( cmd ):
|
||||||
"Print a command and send it to the shell"
|
"Print a command and send it to the shell"
|
||||||
info( cmd + '\n' )
|
info( cmd + '\n' )
|
||||||
@@ -32,7 +33,7 @@ def killprocs( pattern ):
|
|||||||
pids = ''
|
pids = ''
|
||||||
if pids:
|
if pids:
|
||||||
sh( 'pkill -f 9 mininet:' )
|
sh( 'pkill -f 9 mininet:' )
|
||||||
sleep( .5 )
|
time.sleep( .5 )
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user