diff --git a/src/earthkit/regrid/utils/caching.py b/src/earthkit/regrid/utils/caching.py index 328c551..ae4ed17 100644 --- a/src/earthkit/regrid/utils/caching.py +++ b/src/earthkit/regrid/utils/caching.py @@ -373,13 +373,10 @@ def _delete_entry(self, entry): except OSError: pass - if entry["size"] is None: - entry["size"] = 0 - - path, size = ( - entry["path"], - entry["size"], - ) + path = entry["path"] + size = entry["size"] + if size is None: + size = 0 # path, size, owner, args = ( # entry["path"],