From e8f7f5cecefe2592144f68030388d886189d0744 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Wed, 14 Dec 2022 04:12:37 -0500 Subject: [PATCH] Fix pidfile access --- core/utils/processes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]]