Skip to content

Commit 0b6238b

Browse files
authored
Merge pull request #110 from caternuson/neopix_check
Add path check for neopixel.py
2 parents 209b4eb + 1dc8fca commit 0b6238b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

adafruit_seesaw/neopixel.py

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

2121

22+
### hack to make sure this module is not placed in root CIRCUITPY/lib folder
23+
if "." not in __name__:
24+
raise ImportError(
25+
"seesaw neopixel being imported from unexpected location - is seesaw neopixel use intended?"
26+
)
27+
2228
__version__ = "0.0.0+auto.0"
2329
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_seesaw.git"
2430

0 commit comments

Comments
 (0)