Fix incorrect expect placement
Change-Id: Ie3e7fad840d76f9e3910173106ac542b6e214e6b
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 32856b4..e4935fc 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -994,17 +994,19 @@
"\$",
"Unknown\sinstance",
pexpect.TIMEOUT ], timeout=120 )
- self.handle.expect( "\$" )
if i == 0:
+ self.handle.expect( "\$" )
main.log.info( "Service is already running" )
return main.TRUE
elif i == 1:
+ self.handle.expect( "\$" )
main.log.info( "ONOS service started" )
return main.TRUE
elif i == 2:
main.log.info( "ONOS service started" )
return main.TRUE
else:
+ self.handle.expect( "\$" )
main.log.error( "ONOS service failed to start" )
main.cleanup()
main.exit()