Skip to content

Commit ec5a431

Browse files
authored
back to refactor 1 soution
1 parent 4eff679 commit ec5a431

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

platform.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,6 @@ def safe_copy_file(src: str, dst: str) -> bool:
117117
return True
118118

119119

120-
def has_valid_sdkconfig(config_value) -> bool:
121-
"""Check if sdkconfig value is valid and non-empty."""
122-
if not config_value:
123-
return False
124-
return bool(config_value.strip())
125-
126-
127120
class Espressif32Platform(PlatformBase):
128121
"""ESP32 platform implementation for PlatformIO with optimized toolchain management."""
129122

@@ -330,7 +323,8 @@ def _configure_espidf_framework(
330323
board_config.get("espidf.custom_sdkconfig", "")
331324
)
332325

333-
if has_valid_sdkconfig(custom_sdkconfig) or has_valid_sdkconfig(board_sdkconfig):
326+
if (custom_sdkconfig and custom_sdkconfig.strip()) or \
327+
(board_sdkconfig and board_sdkconfig.strip()):
334328
frameworks.append("espidf")
335329
self.packages["framework-espidf"]["optional"] = False
336330
if mcu == "esp32c2":

0 commit comments

Comments
 (0)