Spaces:
Runtime error
Runtime error
File size: 327 Bytes
2afa179 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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 |