timeouts
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 35s
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 35s
This commit is contained in:
parent
91c9d805b0
commit
b510d19597
1 changed files with 6 additions and 1 deletions
|
@ -34,12 +34,17 @@ def run_telnet_command(powerbar, command):
|
|||
try:
|
||||
tn = get_telnet_connection(powerbar)
|
||||
tn.write(f"{command}\r\n".encode('ascii'))
|
||||
time.sleep(0.2)
|
||||
tn.write(f"{command}\r\n".encode('ascii'))
|
||||
return
|
||||
except Exception as e:
|
||||
print(f"Telnet error: {e}")
|
||||
active_telnet_connections.pop(powerbar)
|
||||
if powerbar in active_telnet_connections:
|
||||
active_telnet_connections.pop(powerbar)
|
||||
tn = get_telnet_connection(powerbar)
|
||||
tn.write(f"{command}\r\n".encode('ascii'))
|
||||
time.sleep(0.2)
|
||||
tn.write(f"{command}\r\n".encode('ascii'))
|
||||
return
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue