From e9f63860c29fcc1c7c7d8e5fe5457e26d494c825 Mon Sep 17 00:00:00 2001 From: astrofle Date: Sat, 21 Sep 2024 03:24:55 -0400 Subject: [PATCH] Fix: close httpx.client after download --- src/dysh/util/download.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dysh/util/download.py b/src/dysh/util/download.py index 39f134e9..17406b29 100644 --- a/src/dysh/util/download.py +++ b/src/dysh/util/download.py @@ -68,6 +68,7 @@ def from_url(url, path=Path(".")): for chunk in resp.iter_raw(): out_file.write(chunk) progress.update(task, advance=len(chunk)) + client.close() # If something goes wrong, throw Exception except Exception as exc: