From 3c6253109d02833ba03d7264561cbfdfd1ed85de Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Tue, 6 Dec 2022 17:33:58 +0300 Subject: [PATCH] Fix CPPDEFINES loop (#8744) Expect that (key, value) can be (key,) --- tools/platformio-build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/platformio-build.py b/tools/platformio-build.py index 55f3c0a408..683dcdb120 100644 --- a/tools/platformio-build.py +++ b/tools/platformio-build.py @@ -196,7 +196,7 @@ def scons_patched_match_splitext(path, suffixes=None): NONOSDK_PREFIX = "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_" for define in env["CPPDEFINES"]: if isinstance(define, (tuple, list)): - define, _ = define + define, *_ = define if define.startswith(NONOSDK_PREFIX): for version in NONOSDK_VERSIONS: name, _ = version @@ -204,7 +204,7 @@ def scons_patched_match_splitext(path, suffixes=None): nonosdk_version = version NONOSDK_LIBPATH=join(FRAMEWORK_DIR, "tools", "sdk", "lib", nonosdk_version[1]) -assert(isdir(NONOSDK_LIBPATH)) +assert isdir(NONOSDK_LIBPATH) env.Append( CPPDEFINES=[(nonosdk_version[1], 1)], @@ -336,7 +336,7 @@ def scons_patched_match_splitext(path, suffixes=None): for flag in env["CPPDEFINES"]: define = flag if isinstance(flag, (tuple, list)): - define, _ = flag + define, *_ = flag if define.startswith("MMU_"): mmu_flags.append(flag) # PIO_FRAMEWORK_ARDUINO_MMU_CACHE32_IRAM32 (default)