(self)
| 240 | return None |
| 241 | |
| 242 | def discard(self) -> None: |
| 243 | # Best-effort post-commit/post-rollback cleanup: callers have already |
| 244 | # written a terminal status (mark_committed or rollback), so there is |
| 245 | # nothing to re-write here — doing so would be dead work and would |
| 246 | # silently downgrade a "rolled_back" journal to "committed" moments |
| 247 | # before it is deleted. |
| 248 | shutil.rmtree(self.backup_dir, ignore_errors=True) |
| 249 | self.journal_path.unlink(missing_ok=True) |
| 250 | |
| 251 | def discard_best_effort(self) -> Exception | None: |
| 252 | try: |
no outgoing calls
no test coverage detected