@@ -167,7 +167,8 @@ def _run_idf_tools_install(self, tools_json_path: str, idf_tools_path: str) -> b
167
167
cmd ,
168
168
stdout = subprocess .DEVNULL ,
169
169
stderr = subprocess .DEVNULL ,
170
- timeout = SUBPROCESS_TIMEOUT
170
+ timeout = SUBPROCESS_TIMEOUT ,
171
+ check = False
171
172
)
172
173
173
174
if result .returncode != 0 :
@@ -277,9 +278,14 @@ def _configure_arduino_framework(self, frameworks: List[str]) -> None:
277
278
self .packages ["framework-arduinoespressif32-libs" ]["optional" ] = False
278
279
# use branch master
279
280
URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
280
- packjdata = requests .get (URL ).json ()
281
- dyn_lib_url = packjdata ['packages' ][0 ]['tools' ][0 ]['systems' ][0 ]['url' ]
282
- self .packages ["framework-arduinoespressif32-libs" ]["version" ] = dyn_lib_url
281
+ try :
282
+ response = requests .get (URL , timeout = 30 )
283
+ response .raise_for_status ()
284
+ packjdata = response .json ()
285
+ dyn_lib_url = packjdata ['packages' ][0 ]['tools' ][0 ]['systems' ][0 ]['url' ]
286
+ self .packages ["framework-arduinoespressif32-libs" ]["version" ] = dyn_lib_url
287
+ except (requests .RequestException , KeyError , IndexError ) as e :
288
+ logger .error (f"Failed to fetch Arduino framework library URL: { e } " )
283
289
284
290
def _configure_espidf_framework (self , frameworks : List [str ], variables : Dict , board_config : Dict , mcu : str ) -> None :
285
291
"""Configure ESP-IDF framework"""
0 commit comments