mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
cleanup
This commit is contained in:
parent
fedea96964
commit
8d8b0e6f01
@ -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
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
import os
|
||||
import psutil
|
||||
|
||||
# the docs are a little misleading, but this is either WindowsFileLock
|
||||
|
Loading…
x
Reference in New Issue
Block a user