Fix tpyo.

This commit is contained in:
Johan Bloemberg 2017-01-03 22:27:39 +01:00
parent 763237ef1d
commit 3c9db523fa
No known key found for this signature in database
GPG Key ID: B1AE6948ED49BB55

View File

@ -13,7 +13,7 @@ from .serial import (SERIAL_SETTINGS_V2_2, SERIAL_SETTINGS_V4,
is_end_of_telegram, is_start_of_telegram) is_end_of_telegram, is_start_of_telegram)
def creater_dsmr_protocol(dsmr_version, telegram_callback, loop=None): def create_dsmr_protocol(dsmr_version, telegram_callback, loop=None):
"""Creates a DSMR asyncio protocol.""" """Creates a DSMR asyncio protocol."""
if dsmr_version == '2.2': if dsmr_version == '2.2':
@ -33,7 +33,7 @@ def creater_dsmr_protocol(dsmr_version, telegram_callback, loop=None):
def create_dsmr_reader(port, dsmr_version, telegram_callback, loop=None): def create_dsmr_reader(port, dsmr_version, telegram_callback, loop=None):
"""Creates a DSMR asyncio protocol coroutine using serial port.""" """Creates a DSMR asyncio protocol coroutine using serial port."""
protocol, serial_settings = creater_dsmr_protocol( protocol, serial_settings = create_dsmr_protocol(
dsmr_version, telegram_callback, loop=None) dsmr_version, telegram_callback, loop=None)
serial_settings['url'] = port serial_settings['url'] = port
@ -44,7 +44,7 @@ def create_dsmr_reader(port, dsmr_version, telegram_callback, loop=None):
def create_tcp_dsmr_reader(host, port, dsmr_version, def create_tcp_dsmr_reader(host, port, dsmr_version,
telegram_callback, loop=None): telegram_callback, loop=None):
"""Creates a DSMR asyncio protocol coroutine using TCP connection.""" """Creates a DSMR asyncio protocol coroutine using TCP connection."""
protocol, _ = creater_dsmr_protocol( protocol, _ = create_dsmr_protocol(
dsmr_version, telegram_callback, loop=None) dsmr_version, telegram_callback, loop=None)
conn = loop.create_connection(protocol, host, port) conn = loop.create_connection(protocol, host, port)
return conn return conn