This commit is contained in:
meejah 2022-09-21 20:40:25 -06:00
parent fedea96964
commit 8d8b0e6f01
2 changed files with 1 additions and 6 deletions

View File

@ -62,13 +62,9 @@ def get_pid_from_pidfile(pidfile):
inaccessible, ``-1`` if PID file invalid.
"""
try:
with open(pidfile, "r") as f:
data = f.read().strip()
pid, _ = parse_pidfile(pidfile)
except EnvironmentError:
return None
try:
pid, _ = parse_pidfile(pidfile)
except InvalidPidFile:
return -1

View File

@ -1,4 +1,3 @@
import os
import psutil
# the docs are a little misleading, but this is either WindowsFileLock