Onionr/onionr/etc/cleanup/__init__.py
2019-10-08 17:26:44 -05:00

14 lines
333 B
Python

import os, filepaths
def _safe_remove(path):
try:
os.remove(path)
except FileNotFoundError:
pass
def delete_run_files():
_safe_remove(filepaths.public_API_host_file)
_safe_remove(filepaths.private_API_host_file)
_safe_remove(filepaths.daemon_mark_file)
_safe_remove(filepaths.lock_file)