Fix for frozen onos during disconnect
Change-Id: Icdb3143d8ab40f6722135b49b29e3b2a2c977715
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 0822879..afd3093 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -151,7 +151,10 @@
# ONOS didn't fully load, and logout command isn't working
# or the command timed out
self.handle.send( "\x04" ) # send ctrl-d
- self.handle.expect( "\$" )
+ try:
+ self.handle.expect( "\$" )
+ except pexpect.TIMEOUT:
+ main.log.error( "ONOS did not respond to 'logout' or CTRL-d" )
return main.TRUE
else: # some other output
main.log.warn( "Unknown repsonse to logout command: '{}'",