small fixes

This commit is contained in:
Hans Erik van Elburg 2019-11-25 01:37:48 +01:00
parent f9e9e70771
commit f7ba363b93
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class SerialReader(object):
for telegram in self.telegram_buffer.get_all(): for telegram in self.telegram_buffer.get_all():
try: try:
yield Telegram(telegram, telegram_parser, telegram_specification) yield Telegram(telegram, self.telegram_parser, self.telegram_specification)
except InvalidChecksumError as e: except InvalidChecksumError as e:
logger.warning(str(e)) logger.warning(str(e))
except ParseError as e: except ParseError as e:

View File

@ -7,7 +7,7 @@ from dsmr_parser import telegram_specifications
from dsmr_parser.exceptions import InvalidChecksumError, ParseError from dsmr_parser.exceptions import InvalidChecksumError, ParseError
from dsmr_parser.objects import CosemObject, MBusObject, Telegram from dsmr_parser.objects import CosemObject, MBusObject, Telegram
from dsmr_parser.parsers import TelegramParser from dsmr_parser.parsers import TelegramParser
from test.example_telegrams import TELEGRAM_V4_2 from example_telegrams import TELEGRAM_V4_2
parser = TelegramParser(telegram_specifications.V4) parser = TelegramParser(telegram_specifications.V4)
telegram = Telegram(TELEGRAM_V4_2, parser, telegram_specifications.V4) telegram = Telegram(TELEGRAM_V4_2, parser, telegram_specifications.V4)