Skip to content

Commit 34eab63

Browse files
committed
add path check for neopixel
1 parent 209b4eb commit 34eab63

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adafruit_seesaw/neopixel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
def const(x):
1919
return x
2020

21+
### hack to make sure this module is not placed in root CIRCUITPY/lib folder
22+
if __file__.split('/')[-2] != 'adafruit_seesaw':
23+
raise ImportError("seesaw neopixel being imported from wrong location")
2124

2225
__version__ = "0.0.0+auto.0"
2326
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_seesaw.git"

0 commit comments

Comments
 (0)