From 223ee4b75930e6554ff1c588c5869807ff96fa92 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 14 Dec 2023 12:01:26 +0100 Subject: [PATCH] download: handle timeout --- happypose/toolbox/utils/download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/happypose/toolbox/utils/download.py b/happypose/toolbox/utils/download.py index 0605cea4..ae005eee 100755 --- a/happypose/toolbox/utils/download.py +++ b/happypose/toolbox/utils/download.py @@ -369,7 +369,7 @@ async def adownload(self, download_path, local_path, flags=None): async def download_dir(self, download_path, local_path, flags): try: r = await self.client.get(download_path) - except httpx.PoolTimeout: + except (httpx.PoolTimeout, httpx.ReadTimeout): logger.error(f"Failed {download_path} with timeout") return if r.status_code != 200: