MCPcopy Index your code
hub / github.com/python/cpython / _have_socket_can_isotp

Function _have_socket_can_isotp

Lib/test/test_socket.py:117–125  ·  view source on GitHub ↗

Check whether CAN ISOTP sockets are supported on this host.

()

Source from the content-addressed store, hash-verified

115 return True
116
117def _have_socket_can_isotp():
118 """Check whether CAN ISOTP sockets are supported on this host."""
119 try:
120 s = socket.socket(socket.PF_CAN, socket.SOCK_DGRAM, socket.CAN_ISOTP)
121 except (AttributeError, OSError):
122 return False
123 else:
124 s.close()
125 return True
126
127def _have_socket_can_j1939():
128 """Check whether CAN J1939 sockets are supported on this host."""

Callers 1

test_socket.pyFile · 0.85

Calls 2

socketMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…