Skip to content

Commit 8fa1571

Browse files
tekktrikdhalbert
andauthored
Update adafruit_logging.py
Use try/except for Protocol import Co-authored-by: Dan Halbert <[email protected]>
1 parent 295f0dc commit 8fa1571

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_logging.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@
6363

6464
try:
6565
from typing import Optional
66-
from typing_extensions import Protocol
66+
try:
67+
from typing import Protocol
68+
except ImportError:
69+
from typing_extensions import Protocol
6770

6871
class WriteableStream(Protocol):
6972
"""Any stream that can ``write`` strings"""

0 commit comments

Comments
 (0)