Small fix

This commit is contained in:
2022-06-25 17:29:55 +02:00
parent e66665c86d
commit 80bce11258
2 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ class ExtronSerial(SerialDevice):
def send_command(self, command: str) -> str:
response = super().send_command(command)
if response[0] == "E":
if response and response[0] == "E":
print(response, self.ERRORS.get(response, "Unknown"))
return response

View File

@@ -1,4 +1,4 @@
from doctest import REPORT_CDIFF
import sys
from serial import Serial
@@ -27,7 +27,7 @@ class SerialDevice:
response = ""
if not response:
print(self.prefix, "No response")
print(self.prefix, "No response:", command, file=sys.stderr)
elif self.verbose:
print(self.prefix, "resp:", response)