Check whether BTPROTO_L2CAP sockets are supported on this host.
()
| 184 | |
| 185 | |
| 186 | def _have_socket_bluetooth_l2cap(): |
| 187 | """Check whether BTPROTO_L2CAP sockets are supported on this host.""" |
| 188 | try: |
| 189 | s = socket.socket(socket.AF_BLUETOOTH, socket.SOCK_SEQPACKET, socket.BTPROTO_L2CAP) |
| 190 | except (AttributeError, OSError): |
| 191 | return False |
| 192 | else: |
| 193 | s.close() |
| 194 | return True |
| 195 | |
| 196 | |
| 197 | def _have_socket_hyperv(): |
no test coverage detected
searching dependent graphs…