Spaces:
Runtime error
Runtime error
| # PATH: bot/telegram/files.py | |
| from __future__ import annotations | |
| import os | |
| def cleanup_file(path: str) -> None: | |
| """Best-effort remove a temp file.""" | |
| if not path: | |
| return | |
| try: | |
| if os.path.exists(path): | |
| os.remove(path) | |
| except Exception: | |
| # ignore cleanup failures | |
| pass |