Fix for sending extra new line after interrupting a command
Change-Id: I05784a7b53b43781be13750023bccee3cc35085d
diff --git a/TestON/drivers/common/cli/emulator/lincoemininetdriver.py b/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
index df1abd7..ba54a75 100644
--- a/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
@@ -73,7 +73,7 @@
self.handle.sendline( cmd )
lincStart = self.handle.expect( [ "mininet>", pexpect.TIMEOUT ], timeout=120 )
if lincStart == 1:
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.sendline( "sudo mn -c" )
self.handle.sendline( cmd )
lincStart = self.handle.expect( [ "mininet>", pexpect.TIMEOUT ], timeout=120 )
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 7f9ac0e..1da21b9 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -485,7 +485,7 @@
main.log.exception( self.name + ": TIMEOUT exception" )
response = self.handle.before
# NOTE: Send ctrl-c to make sure command is stopped
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.expect( "Interrupt" )
response += self.handle.before + self.handle.after
self.handle.expect( "mininet>" )
@@ -553,7 +553,7 @@
main.log.exception( self.name + ": TIMEOUT exception" )
response = self.handle.before
# NOTE: Send ctrl-c to make sure command is stopped
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.expect( "Interrupt" )
response += self.handle.before + self.handle.after
self.handle.expect( "mininet>" )
@@ -616,7 +616,7 @@
main.log.exception( self.name + ": TIMEOUT exception" )
response = self.handle.before
# NOTE: Send ctrl-c to make sure command is stopped
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.expect( "Interrupt" )
response += self.handle.before + self.handle.after
self.handle.expect( "mininet>" )
@@ -763,7 +763,7 @@
main.log.exception( self.name + ": TIMEOUT exception" )
response = self.handle.before
# NOTE: Send ctrl-c to make sure command is stopped
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.expect( "Interrupt" )
response += self.handle.before + self.handle.after
self.handle.expect( "mininet>" )
@@ -1470,7 +1470,7 @@
main.log.error( self.name + " response: " +
repr( self.handle.before ) )
# NOTE: Send ctrl-c to make sure iperf is done
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.expect( "Interrupt" )
self.handle.expect( "mininet>" )
return main.FALSE
@@ -1505,7 +1505,7 @@
except pexpect.TIMEOUT:
main.log.error( self.name + ": TIMEOUT exception found" )
main.log.error( self.name + " response: " + repr( self.handle.before ) )
- self.handle.sendline( "\x03" )
+ self.handle.send( "\x03" )
self.handle.expect( "Interrupt" )
self.handle.expect( "mininet>" )
return main.FALSE