Skip to content

Commit ef98b5e

Browse files
committed
Refactor download function for robustness and retries
Updated the download function to use requests for robust streaming with retries and improved error handling.
1 parent eb4ebcb commit ef98b5e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

backends/qualcomm/scripts/download_qnn_sdk.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,12 @@ def _download_archive(url: str, archive_path: pathlib.Path) -> bool:
146146
logger.info("Download completed!")
147147

148148
except Exception as e:
149-
logger.exception("Error during download: %s", e)
149+
logger.error("Error during download: %s", e)
150150
return False
151151

152152
if archive_path.exists() and archive_path.stat().st_size == 0:
153153
logger.warning("Downloaded file is empty!")
154154
return False
155-
elif not archive_path.exists():
156-
logger.error("File was not downloaded!")
157-
return False
158-
159155
return True
160156

161157

0 commit comments

Comments
 (0)