Fix console imports.

This commit is contained in:
Johan Bloemberg 2016-11-07 20:04:59 +01:00
parent 447f2a24fb
commit cf771776cd
No known key found for this signature in database
GPG Key ID: B1AE6948ED49BB55
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
*.pyc
.tox
.cache
*.egg-info

View File

@ -1,6 +1,6 @@
import serial
from dsmr_parser.parsers import TelegramParser, V3TelegramParser
from dsmr_parser.parsers import TelegramParser, TelegramParserV2_2
SERIAL_SETTINGS_V2_2 = {
'baudrate': 9600,
@ -38,7 +38,7 @@ class SerialReader(object):
self.serial_settings['port'] = device
if serial_settings is SERIAL_SETTINGS_V2_2:
telegram_parser = V3TelegramParser
telegram_parser = TelegramParserV2_2
else:
telegram_parser = TelegramParser
self.telegram_parser = telegram_parser(telegram_specification)