Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Commit

Permalink
tcp: ignore identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Jul 4, 2018
1 parent 1daee96 commit ba44e89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion newfocus8742/tcp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import logging
import asyncio

from .protocol import NewFocus8742Protocol

logger = logging.getLogger(__name__)


class NewFocus8742TCP(NewFocus8742Protocol):
eol_write = b"\r"
Expand All @@ -24,7 +27,7 @@ async def connect(cls, host, port=23, **kwargs):
reader, writer = await asyncio.open_connection(host, port, **kwargs)
# undocumented? garbage?
v = await reader.read(6)
assert v == b"\xff\xfb\x01\xff\xfb\x03", v
logger.debug("identifier/serial (?): %s", v)
return cls(reader, writer)

def __enter__(self):
Expand Down

0 comments on commit ba44e89

Please sign in to comment.