better logic
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 7s

This commit is contained in:
Matthew Frost 2023-12-02 16:55:51 +01:00
parent 00238b3033
commit d649cbfb18

View file

@ -4,7 +4,6 @@ from flask import jsonify
import telnetlib
import time
routes = Blueprint('routes', __name__)
# Create a dictionary to store the active telnet connections
@ -32,6 +31,7 @@ def get_telnet_connection(powerbar):
def run_telnet_command(powerbar, command):
try:
tn = get_telnet_connection(powerbar)
tn.write(f"{command}\r\n".encode('ascii'))
return
except Exception as e: