Skip to content

Commit 1c56c2c

Browse files
committed
separate typing imports try/except from sturct import try/except
The changes to add type hints accidentally made the module non-importable on circuitpython boards. I'm not sure whether we need to keep the `ustruct` compatibility (it would only apply to micropython) but go ahead and do so. Closes: #36
1 parent af5fc32 commit 1c56c2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adafruit_fingerprint.py

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
try:
3131
from typing import Tuple, List, Union
3232
from busio import UART
33+
except ImportError:
34+
pass
35+
36+
try:
3337
import struct
3438
except ImportError:
3539
import ustruct as struct

0 commit comments

Comments
 (0)