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

Function _have_socket_bluetooth_l2cap

Lib/test/test_socket.py:186–194  ·  view source on GitHub ↗

Check whether BTPROTO_L2CAP sockets are supported on this host.

()

Source from the content-addressed store, hash-verified

184
185
186def _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
197def _have_socket_hyperv():

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…