Skip to content

Commit 2418fdd

Browse files
committed
fix(script): Apply copilot suggestions
1 parent 667999e commit 2418fdd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/scripts/update_esptool.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,15 @@ def update_json_from_release(tmp_json_path, version, release_info):
185185
print(f"Skipping unknown archive type: {asset_fname}")
186186
continue
187187

188-
asset_url = asset.get("browser_download_url")
189-
asset_checksum = asset.get("digest")
190-
asset_size = asset.get("size")
191-
if asset_checksum is None:
192-
asset_checksum = ""
193-
print(f"Asset {asset_fname} has no checksum. Please set the checksum in the JSON file.")
194-
195-
for host in hosts:
196-
update_json_for_host(tmp_json_path, version, host, asset_url, asset_fname, asset_checksum, asset_size)
188+
asset_url = asset.get("browser_download_url")
189+
asset_checksum = asset.get("digest")
190+
asset_size = asset.get("size")
191+
if asset_checksum is None:
192+
asset_checksum = ""
193+
print(f"Asset {asset_fname} has no checksum. Please set the checksum in the JSON file.")
194+
195+
for host in hosts:
196+
update_json_for_host(tmp_json_path, version, host, asset_url, asset_fname, asset_checksum, asset_size)
197197

198198
def get_release_info(version):
199199
url = f"https://api.github.com/repos/espressif/esptool/releases/tags/v{version}"

0 commit comments

Comments
 (0)