From af4597d5a86c024fe4fc0f362f5751dabf9fcd68 Mon Sep 17 00:00:00 2001 From: Loic Huder Date: Mon, 26 Aug 2024 16:23:59 +0200 Subject: [PATCH] Fix file not closed when resolve_links cannot be parsed --- h5grove/content.py | 1 + 1 file changed, 1 insertion(+) diff --git a/h5grove/content.py b/h5grove/content.py index 2b28ccc..72c2206 100644 --- a/h5grove/content.py +++ b/h5grove/content.py @@ -288,6 +288,7 @@ def get_content_from_file( fallback=LinkResolution.ONLY_VALID, ) except QueryArgumentError as e: + f.close() raise create_error(422, str(e)) try: