From: Dobrica Pavlinusic Date: Sun, 23 Jul 2023 11:12:10 +0000 (+0200) Subject: don't respond on error, only one line of output X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=0359ce1b5aba54d7db6751cd90c5c8a34924cc94;p=veternica don't respond on error, only one line of output --- diff --git a/ser-kramer.py b/ser-kramer.py old mode 100644 new mode 100755 index 322316a..1ab5d9d --- a/ser-kramer.py +++ b/ser-kramer.py @@ -25,13 +25,14 @@ def read_and_respond(): elif read_bytes == b"\x14\x81\x80\x81": response = b"\x54\x81\x80\x81" else: - response = b"\xDE\xAD\xBE\xEF" + response = b"" + #response = b"\xDE\xAD\xBE\xEF" + print("ERROR no reponse for", read_bytes.hex()) # Send the response back ser.write(response) - print("Received:", read_bytes, read_bytes.hex()) - print("Response:", response, response.hex()) + print("<<", read_bytes.hex(), ">>", response.hex()) if __name__ == "__main__": read_and_respond()