Onionr/onionr/etc/cleanup/__init__.py

13 lines
294 B
Python
Raw Normal View History

2019-07-31 05:10:28 +00:00
import os, filepaths
2019-09-20 16:25:12 +00:00
def _safe_remove(path):
2019-07-31 05:10:28 +00:00
try:
2019-09-20 16:25:12 +00:00
os.remove(path)
2019-07-31 05:10:28 +00:00
except FileNotFoundError:
pass
2019-09-20 16:25:12 +00:00
def delete_run_files():
_safe_remove(filepaths.public_API_host_file)
_safe_remove(filepaths.private_API_host_file)
_safe_remove(filepaths.daemon_mark_file)