fix code style

This commit is contained in:
Nigel Dokter 2023-01-01 20:55:58 +01:00
parent f851f48225
commit 0a259a3c9d

View File

@ -119,12 +119,11 @@ class AsyncSerialReader(SerialReader):
self.telegram_buffer.append(data.decode('ascii'))
for telegram in self.telegram_buffer.get_all():
try:
queue.put_nowait(
Telegram(telegram, self.telegram_parser, self.telegram_specification)
)
except InvalidChecksumError as e:
logger.warning(str(e))
except ParseError as e:
logger.error('Failed to parse telegram: %s', e)
try:
queue.put_nowait(
Telegram(telegram, self.telegram_parser, self.telegram_specification)
)
except InvalidChecksumError as e:
logger.warning(str(e))
except ParseError as e:
logger.error('Failed to parse telegram: %s', e)