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?