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