Small fix
This commit is contained in:
@@ -41,7 +41,7 @@ class ExtronSerial(SerialDevice):
|
|||||||
def send_command(self, command: str) -> str:
|
def send_command(self, command: str) -> str:
|
||||||
response = super().send_command(command)
|
response = super().send_command(command)
|
||||||
|
|
||||||
if response[0] == "E":
|
if response and response[0] == "E":
|
||||||
print(response, self.ERRORS.get(response, "Unknown"))
|
print(response, self.ERRORS.get(response, "Unknown"))
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from doctest import REPORT_CDIFF
|
import sys
|
||||||
from serial import Serial
|
from serial import Serial
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ class SerialDevice:
|
|||||||
response = ""
|
response = ""
|
||||||
|
|
||||||
if not response:
|
if not response:
|
||||||
print(self.prefix, "No response")
|
print(self.prefix, "No response:", command, file=sys.stderr)
|
||||||
elif self.verbose:
|
elif self.verbose:
|
||||||
print(self.prefix, "resp:", response)
|
print(self.prefix, "resp:", response)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user