From 81526e640121f1788a1fcb930bb49a088949e1d9 Mon Sep 17 00:00:00 2001 From: Norbert Szulc Date: Wed, 2 Nov 2022 12:29:22 +0100 Subject: [PATCH] Use public module for imports Depends on platformio-core 6.1.6 --- builder/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builder/main.py b/builder/main.py index cd26eda..4cbcf7a 100644 --- a/builder/main.py +++ b/builder/main.py @@ -331,8 +331,12 @@ def TryResetPico(target, source, env): if upload_options.get("use_1200bps_touch", False): env.TouchSerialPort(last_port, 1200) time.sleep(2.0) +try: + from platformio.public import list_logical_devices +except ImportError: + sys.stderr.write("Warning! Update platformio-core >= 6.1.6") + from platformio.device.list.util import list_logical_devices -from platformio.device.list.util import list_logical_devices from platformio.device.finder import is_pattern_port from fnmatch import fnmatch