understanding's picture
Create files.py
2afa179 verified
raw
history blame contribute delete
327 Bytes
# 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