Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Jun 5, 2024
1 parent 5c6d97e commit cd06034
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/otaclient/app/ota_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,13 @@ def _download_file(

_local_copy = self._ota_tmp_on_standby / _fhash_str
entry_url, compression_alg = self._otameta.get_download_url(entry)
try:
cur_stat.download_errors, _, _ = self._downloader.download(
entry_url,
_local_copy,
digest=_fhash_str,
size=entry.size,
compression_alg=compression_alg,
)
except Exception as e:
logger.warning(f"failed to download {entry=}: {e!r}")
raise
cur_stat.download_errors, _, _ = self._downloader.download(
entry_url,
_local_copy,
digest=_fhash_str,
size=entry.size,
compression_alg=compression_alg,
)
cur_stat.size = _local_copy.stat().st_size
return cur_stat

Expand Down

0 comments on commit cd06034

Please sign in to comment.