small fixes
This commit is contained in:
parent
f9e9e70771
commit
f7ba363b93
@ -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:
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user