| 298 | self.integrity = {} |
| 299 | |
| 300 | def save(self, manifest=None): |
| 301 | if manifest: |
| 302 | self._config.set("cache", "manifest", manifest.id_str) |
| 303 | self._config.set("cache", "ignored_features", ",".join(self.ignored_features)) |
| 304 | self._config.set("cache", "mandatory_features", ",".join(self.mandatory_features)) |
| 305 | if not self._config.has_section("integrity"): |
| 306 | self._config.add_section("integrity") |
| 307 | for file, integrity_data in self.integrity.items(): |
| 308 | self._config.set("integrity", file, integrity_data) |
| 309 | self._config.set("integrity", "manifest", manifest.id_str) |
| 310 | with SaveFile(self.config_path) as fd: |
| 311 | self._config.write(fd) |
| 312 | |
| 313 | def close(self): |
| 314 | pass |