Skip to content

Commit 6707af2

Browse files
committed
Added check for environ existing, tested
1 parent d01c198 commit 6707af2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adafruit_ble_broadcastnet.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def broadcast(measurement, *, broadcast_time=0.1, extended=False):
5858

5959

6060
# This line causes issues with Sphinx, so we won't run it in the CI
61-
if "GITHUB_ACTION" not in os.environ and "READTHEDOCS" not in os.environ:
61+
if not hasattr(os, "environ") or (
62+
"GITHUB_ACTION" not in os.environ and "READTHEDOCS" not in os.environ
63+
):
6264
device_address = "{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}".format( # pylint: disable=invalid-name
6365
*reversed(
6466
list(

0 commit comments

Comments
 (0)