Skip to content

Commit 3be73b4

Browse files
author
Travis-L-R
committed
Removing unnecessary initialization of self.stream in TCPInterface
1 parent 2245ac8 commit 3be73b4

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

meshtastic/stream_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__( # pylint: disable=R0917
4646
raise RuntimeError(
4747
"StreamInterface is now abstract (to update existing code create SerialInterface instead)"
4848
)
49-
self.stream: Optional[serial.Serial] # only serial uses this, TCPInterface overrides the relevant methods instead
49+
self.stream: Optional[serial.Serial] = None # only serial uses this, TCPInterface overrides the relevant methods instead
5050
self._rxBuf = bytes() # empty
5151
self._wantExit = False
5252

meshtastic/tcp_interface.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ def __init__(
3131
hostname {string} -- Hostname/IP address of the device to connect to
3232
timeout -- How long to wait for replies (default: 300 seconds)
3333
"""
34-
35-
self.stream = None
36-
3734
self.hostname: str = hostname
3835
self.portNumber: int = portNumber
3936

0 commit comments

Comments
 (0)