mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
add force = True on close to make sure telnet is closed
This commit is contained in:
@@ -597,13 +597,13 @@ def main():
|
|||||||
logg.info("9800 will send escape to close telnet")
|
logg.info("9800 will send escape to close telnet")
|
||||||
egg.sendline("\x1b\r")
|
egg.sendline("\x1b\r")
|
||||||
logg.info("9800 the excape was found... close egg session")
|
logg.info("9800 the excape was found... close egg session")
|
||||||
egg.close()
|
egg.close(force = True)
|
||||||
exit(1)
|
exit(1)
|
||||||
else:
|
else:
|
||||||
logg.info("9800 the telnet session may need to be cleared will try to send logout")
|
logg.info("9800 the telnet session may need to be cleared will try to send logout")
|
||||||
egg.sendline("logout")
|
egg.sendline("logout")
|
||||||
logg.info("9800 did not find the initial escape... exiting")
|
logg.info("9800 did not find the initial escape... exiting")
|
||||||
egg.close()
|
egg.close(force = True)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# 3504 series
|
# 3504 series
|
||||||
@@ -1031,7 +1031,7 @@ def main():
|
|||||||
egg.sendline("\x1b\r")
|
egg.sendline("\x1b\r")
|
||||||
sleep(0.2)
|
sleep(0.2)
|
||||||
logg.info("send close to the egg child process")
|
logg.info("send close to the egg child process")
|
||||||
egg.close()
|
egg.close(force = True)
|
||||||
logg.info("send escape to exit connection")
|
logg.info("send escape to exit connection")
|
||||||
# 3504
|
# 3504
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user