add force = True on close to make sure telnet is closed

This commit is contained in:
Chuck SmileyRekiere
2020-09-29 14:08:00 -06:00
parent 5bdb90ef65
commit b64e3e4452

View File

@@ -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: