File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -120,14 +120,16 @@ def install_tool(TOOL, retry_count=0):
120
120
if "arduino" in frameworks :
121
121
self .packages ["framework-arduinoespressif32" ]["optional" ] = False
122
122
self .packages ["framework-arduinoespressif32-libs" ]["optional" ] = False
123
- try :
124
- # use newer branch idf-release/v5.4 when existing
125
- self .packages ["framework-arduinoespressif32" ]["version" ] = "https://github.com/espressif/arduino-esp32/archive/refs/heads/idf-release/v5.4.zip"
126
- URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/idf-release/v5.4/package/package_esp32_index.template.json"
127
- except :
123
+ # use newer branch idf-release/v5.4 when existing
124
+ self .packages ["framework-arduinoespressif32" ]["version" ] = "https://github.com/espressif/arduino-esp32/archive/refs/heads/idf-release/v5.4.zip"
125
+ URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/idf-release/v5.4/package/package_esp32_index.template.json"
126
+ req = requests .get (URL )
127
+ if req .status_code == 200 :
128
+ packjdata = req .json ()
129
+ else :
128
130
# use branch master
129
131
URL = "https://raw.githubusercontent.com/espressif/arduino-esp32/master/package/package_esp32_index.template.json"
130
- packjdata = requests .get (URL ).json ()
132
+ packjdata = requests .get (URL ).json ()
131
133
dyn_lib_url = packjdata ['packages' ][0 ]['tools' ][0 ]['systems' ][0 ]['url' ]
132
134
self .packages ["framework-arduinoespressif32-libs" ]["version" ] = dyn_lib_url
133
135
You can’t perform that action at this time.
0 commit comments