Skip to content

Commit 4e65eb4

Browse files
Update pyfoxfile_py3.py
1 parent 9f18052 commit 4e65eb4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pyfoxfile_py3.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ def randbits(k):
6666
value = int.from_bytes(raw_bytes, 'big')
6767
return value >> (num_bytes * 8 - k)
6868

69+
# Optional Bluetooth RFCOMM support: works via stdlib on Linux (AF_BLUETOOTH/BTPROTO_RFCOMM)
70+
# and via PyBluez if installed.
71+
try:
72+
import bluetooth as _pybluez # type: ignore
73+
except Exception:
74+
_pybluez = None
75+
6976
defcert = None
7077
try:
7178
import certifi

0 commit comments

Comments
 (0)