The tools tree might have been removed because it's cache was out of
date so let's make sure we check it exists in cache_manifest().
base64.b64encode(script.read_bytes()).decode() for script in self.prepare_scripts
),
# Statting the root directory of the tools tree isn't fool proof but should be good enough.
- "tools_tree": [self.tools_tree, self.tools_tree.stat().st_mtime_ns] if self.tools_tree else [],
+ "tools_tree": (
+ [self.tools_tree, self.tools_tree.stat().st_mtime_ns]
+ if self.tools_tree and self.tools_tree.exists()
+ else []
+ ),
}
def to_dict(self) -> dict[str, Any]: