Rework ProcessManagingEH log API

This commit is contained in:
Kristóf Tóth
2018-05-28 16:36:59 +02:00
parent 1a93dad562
commit 9723f98950
2 changed files with 7 additions and 5 deletions

View File

@ -35,5 +35,8 @@ class SupervisorLogMixin(SupervisorBaseMixin):
def clear_logs(self, process_name):
for logfile in ('stdout_logfile', 'stderr_logfile'):
remove(self.supervisor.getProcessInfo(process_name)[logfile])
try:
remove(self.supervisor.getProcessInfo(process_name)[logfile])
except FileNotFoundError:
pass
self.supervisor.clearProcessLogs(process_name)