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