1 parent ae71047 commit e9ab622Copy full SHA for e9ab622
1 file changed
meshtastic/util.py
@@ -19,7 +19,12 @@
19
import packaging.version as pkg_version
20
import requests
21
import serial # type: ignore[import-untyped]
22
-import serial.tools.list_ports # type: ignore[import-untyped]
+try:
23
+ import serial.tools.list_ports # type: ignore[import-untyped]
24
+except ImportError as e:
25
+ print("Error: ", e)
26
+ print("Error: Cannot list ports on this platform")
27
+ print("Warning: Skipping import serial.tools.list_ports")
28
29
from meshtastic.supported_device import supported_devices
30
from meshtastic.version import get_active_version
0 commit comments