diff --git a/core/utils/processes.py b/core/utils/processes.py index 8b01155a..a1ac0898 100644 --- a/core/utils/processes.py +++ b/core/utils/processes.py @@ -88,7 +88,8 @@ class PosixProcess: if not self.lasterror: if self.lock_socket: self.lock_socket.close() - self.pidpath.unlink(missing_ok=True) + if self.pidpath.is_file(): + self.pidpath.unlink() ProcessType = typing.Type[typing.Union[PosixProcess, WindowsProcess]]