mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-03-19 03:14:41 +01:00
Shorten class libraVNA check_cmds, timeout arguments
default_check_cmds -> check_cmds default_timeout -> timeout
This commit is contained in:
parent
95e59769fd
commit
106832624a
|
|
@ -70,15 +70,15 @@ class SocketStreamReader:
|
|||
|
||||
class libreVNA:
|
||||
def __init__(self, host='localhost', port=19542,
|
||||
default_check_cmds=True, default_timeout=1):
|
||||
check_cmds=True, timeout=1):
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
self.sock.connect((host, port))
|
||||
except:
|
||||
raise Exception("Unable to connect to LibreVNA-GUI. Make sure it is running and the TCP server is enabled.")
|
||||
self.reader = SocketStreamReader(self.sock,
|
||||
default_timeout=default_timeout)
|
||||
self.default_check_cmds = default_check_cmds
|
||||
default_timeout=timeout)
|
||||
self.default_check_cmds = check_cmds
|
||||
|
||||
def __del__(self):
|
||||
self.sock.close()
|
||||
|
|
|
|||
Loading…
Reference in a new issue