Skip to content

Commit 2e7fe57

Browse files
committed
make listen_only attribute private
1 parent 4afa299 commit 2e7fe57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

can/interfaces/slcan.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ def __init__(
8484
turn hardware handshake (RTS/CTS) on and off
8585
:param listen_only:
8686
If True, open interface/channel in listen mode with ``L`` command.
87-
Otherwise, the (default) ``O`` command is still used. See ``open`` methode.
87+
Otherwise, the (default) ``O`` command is still used. See ``open`` method.
8888
:param timeout:
8989
Timeout for the serial or usb device in seconds (default 0.001)
9090
9191
:raise ValueError: if both ``bitrate`` and ``btr`` are set or the channel is invalid
9292
:raise CanInterfaceNotImplementedError: if the serial module is missing
9393
:raise CanInitializationError: if the underlying serial connection could not be established
9494
"""
95-
self.listen_only = listen_only
95+
self._listen_only = listen_only
9696

9797
if serial is None:
9898
raise CanInterfaceNotImplementedError("The serial module is not installed")
@@ -195,7 +195,7 @@ def flush(self) -> None:
195195
self.serialPortOrig.reset_input_buffer()
196196

197197
def open(self) -> None:
198-
if self.listen_only:
198+
if self._listen_only:
199199
self._write("L")
200200
else:
201201
self._write("O")

0 commit comments

Comments
 (0)