ignoring trailing \xff in byte stream

This commit is contained in:
Gunnar Klauberg
2021-11-12 18:13:48 +01:00
parent 761aaccb3f
commit 007b3ea089
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class DSMRProtocol(asyncio.Protocol):
def data_received(self, data):
"""Add incoming data to buffer."""
data = data.decode("ascii")
data = data.decode("ascii", errors="ignore")
self._active = True
self.log.debug("received data: %s", data)
self.telegram_buffer.append(data)