mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 05:32:55 +00:00 
			
		
		
		
	Use contextlib.suppress() to suppress stuff in SupervisorLogMixin
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user