Skip to content

Commit ab30b36

Browse files
Only expose SocketCAN classes directly on Linux
1 parent 49eb730 commit ab30b36

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

can/interface.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
from .util import load_config
2121
from .interfaces import BACKENDS
2222

23-
from can.interfaces.socketcan.socketcan import CyclicSendTask, MultiRateCyclicSendTask
23+
if 'linux' in sys.platform:
24+
# Deprecated and undocumented access to SocketCAN cyclic tasks
25+
# Will be removed in version 3.0
26+
from can.interfaces.socketcan import CyclicSendTask, MultiRateCyclicSendTask
2427

2528
# Required by "detect_available_configs" for argument interpretation
2629
if sys.version_info.major > 2:

0 commit comments

Comments
 (0)