added cleanup test and test-re-runner automation script
This commit is contained in:
parent
4e053f1b30
commit
a8290e2ac3
7 changed files with 90 additions and 10 deletions
|
@ -1,8 +1,10 @@
|
|||
"""
|
||||
Onionr - Private P2P Communication
|
||||
"""Onionr - Private P2P Communication.
|
||||
|
||||
cleanup files
|
||||
cleanup run files
|
||||
"""
|
||||
import os
|
||||
|
||||
import filepaths
|
||||
"""
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -17,7 +19,7 @@
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os, filepaths
|
||||
|
||||
|
||||
def _safe_remove(path):
|
||||
try:
|
||||
|
@ -25,8 +27,13 @@ def _safe_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)
|
||||
"""Delete run files, do not error if not found.
|
||||
|
||||
Test: test_cleanup.py
|
||||
"""
|
||||
_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)
|
||||
|
|
|
@ -42,7 +42,7 @@ def __event_caller(event_name, data = {}):
|
|||
plugins.disable(plugin, stop_event = False)
|
||||
except Exception as e:
|
||||
logger.warn('Event "%s" failed for plugin "%s".' % (event_name, plugin), terminal=True)
|
||||
logger.debug(str(e), terminal=True)
|
||||
logger.debug((event_name + ' - ' + plugin + ' - ' + str(e)), terminal=True)
|
||||
|
||||
def event(event_name, data = {}, threaded = True):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue