Check whether CAN ISOTP sockets are supported on this host.
()
| 115 | return True |
| 116 | |
| 117 | def _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 | |
| 127 | def _have_socket_can_j1939(): |
| 128 | """Check whether CAN J1939 sockets are supported on this host.""" |
no test coverage detected
searching dependent graphs…