Skip to content

Commit 0d647e1

Browse files
committed
Skip unnecessary import
1 parent c01ef88 commit 0d647e1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

platformio/compat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def shlex_join(split_command):
4242
if sys.version_info >= (3, 9):
4343
from asyncio import to_thread as aio_to_thread
4444
else:
45-
from starlette.concurrency import run_in_threadpool as aio_to_thread
45+
try:
46+
from starlette.concurrency import run_in_threadpool as aio_to_thread
47+
except ImportError:
48+
pass
4649

4750

4851
PY2 = sys.version_info[0] == 2 # DO NOT REMOVE IT. ESP8266/ESP32 depend on it

0 commit comments

Comments
 (0)