From eefda7a0a348f1d754155b459590862c6783caaa Mon Sep 17 00:00:00 2001 From: Pierre Camilleri <22995923+pierrecamilleri@users.noreply.github.com> Date: Wed, 18 Sep 2024 22:45:23 +0200 Subject: [PATCH] fix --- frictionless/formats/excel/parsers/xlsx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frictionless/formats/excel/parsers/xlsx.py b/frictionless/formats/excel/parsers/xlsx.py index b402fdc6d5..591afb79e1 100644 --- a/frictionless/formats/excel/parsers/xlsx.py +++ b/frictionless/formats/excel/parsers/xlsx.py @@ -64,7 +64,8 @@ def read_loader(self): target = tempfile.NamedTemporaryFile(delete=delete) shutil.copyfileobj(loader.byte_stream, target) target.seek(0) - if not target.delete: + + if not delete: control.workbook_cache[path] = target.name # type: ignore atexit.register(os.remove, target.name) # TODO: rebase on using resource without system?