mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 04:11:32 +00:00
Use contextlib.suppress() to suppress stuff in SupervisorLogMixin
This commit is contained in:
parent
3bb97a6dcc
commit
babb14288c
@ -45,8 +45,6 @@ class SupervisorLogMixin(SupervisorBaseMixin):
|
||||
|
||||
def clear_logs(self, process_name):
|
||||
for logfile in ('stdout_logfile', 'stderr_logfile'):
|
||||
try:
|
||||
with suppress(FileNotFoundError):
|
||||
remove(self.supervisor.getProcessInfo(process_name)[logfile])
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
self.supervisor.clearProcessLogs(process_name)
|
||||
|
Loading…
Reference in New Issue
Block a user