mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-20 15:40:38 +01:00
raise exception when error is returned by cmd
This commit is contained in:
parent
d674d05083
commit
a0476d1bf2
|
|
@ -82,7 +82,9 @@ class libreVNA:
|
|||
def cmd(self, cmd):
|
||||
self.sock.sendall(cmd.encode())
|
||||
self.sock.send(b"\n")
|
||||
self.__read_response()
|
||||
resp = self.__read_response()
|
||||
if len(resp) > 0:
|
||||
raise Exception("Expected empty response but got "+resp)
|
||||
|
||||
def query(self, query):
|
||||
self.sock.sendall(query.encode())
|
||||
|
|
|
|||
Loading…
Reference in a new issue