Skip to content

Commit 434e796

Browse files
committed
[#18] Wrap ESP_SPIcontrol import in a try-except
1 parent 5508d48 commit 434e796

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

adafruit_ntp.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@
2121
"""
2222
import time
2323
import rtc
24-
from adafruit_esp32spi.adafruit_esp32spi import ESP_SPIcontrol
24+
25+
try:
26+
# Used only for typing
27+
import typing # pylint: disable=unused-import
28+
from adafruit_esp32spi.adafruit_esp32spi import ESP_SPIcontrol
29+
except ImportError:
30+
pass
2531

2632
__version__ = "0.0.0-auto.0"
2733
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_NTP.git"

0 commit comments

Comments
 (0)