From ed2c29d190d9a3c62e186a5ad5493959df14cc1b Mon Sep 17 00:00:00 2001 From: Adam <34376104+AdamJohnSwan@users.noreply.github.com> Date: Tue, 17 Sep 2024 20:51:07 -0400 Subject: [PATCH] replace invalid utf-8 characters when doing discovery so the discovery doesn't fail. --- pyeiscp/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyeiscp/protocol.py b/pyeiscp/protocol.py index b45f516..468923c 100644 --- a/pyeiscp/protocol.py +++ b/pyeiscp/protocol.py @@ -85,7 +85,7 @@ def parse(cls, bytes): """Parse the eISCP package given by ``bytes``. """ h = cls.parse_header(bytes[:16]) - data = bytes[h.header_size : h.header_size + h.data_size].decode() + data = bytes[h.header_size : h.header_size + h.data_size].decode(errors='replace') assert len(data) == h.data_size return data