diff options
author | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-12-13 09:39:21 +0000 |
---|---|---|
committer | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-12-16 09:25:21 +0000 |
commit | 8da6441c87532d20d3c8dad538e46dc99d073927 (patch) | |
tree | 6afb7f0c82c5c357f7497413f0e18473e84d472c /src/mlia/utils/download.py | |
parent | ba9aeace4c3d3f4f31830d68b5cc7dd3f4bf1dde (diff) | |
download | mlia-8da6441c87532d20d3c8dad538e46dc99d073927.tar.gz |
MLIA-460 Revisit backend management
- Provide command for backend installation in case
if backend is not available
- Fix issue with connection timeout during downloading
- Show installation tools output only in verbose mode
Change-Id: Ic0e495ba19879cc2cda4fd0bce20b57ba896cfeb
Diffstat (limited to 'src/mlia/utils/download.py')
-rw-r--r-- | src/mlia/utils/download.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mlia/utils/download.py b/src/mlia/utils/download.py index c8d0b69..e00be28 100644 --- a/src/mlia/utils/download.py +++ b/src/mlia/utils/download.py @@ -46,9 +46,10 @@ def download( show_progress: bool = False, label: str | None = None, chunk_size: int = 8192, + timeout: int = 30, ) -> None: """Download the file.""" - with requests.get(url, stream=True, timeout=10.0) as resp: + with requests.get(url, stream=True, timeout=timeout) as resp: resp.raise_for_status() content_chunks = resp.iter_content(chunk_size=chunk_size) |