Skip to content

Commit 60471ff

Browse files
committed
retry install 3 times
1 parent 5f72243 commit 60471ff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build_platform.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,13 @@ def install_platform(fqbn, full_platform_name=None):
229229
install_platform("arduino:avr", full_platform_name)
230230
if full_platform_name[2] is not None:
231231
manually_install_esp32_bsp(full_platform_name[2]) # build esp32 bsp from desired source and branch
232-
if os.system("arduino-cli core install "+fqbn+" --additional-urls "+BSP_URLS+" > /dev/null") != 0:
232+
for retry in range(0, 3):
233+
if os.system("arduino-cli core install "+fqbn+" --additional-urls "+BSP_URLS+" > /dev/null") == 0:
234+
break
235+
print("...retrying...", end=" ")
236+
time.sleep(10) # wait 10 seconds then try again?
237+
else:
238+
# tried 3 times to no avail
233239
ColorPrint.print_fail("FAILED to install "+fqbn)
234240
exit(-1)
235241
ColorPrint.print_pass(CHECK)

0 commit comments

Comments
 (0)