mirror of
https://github.com/lutris/lutris
synced 2024-10-02 22:14:23 +00:00
Don't make assumptions about path of fuser
This commit is contained in:
parent
292dd776b4
commit
f3d079245f
|
@ -243,11 +243,13 @@ def get_pids_using_file(path):
|
|||
if not os.path.exists(path):
|
||||
logger.error("No file %s", path)
|
||||
return set()
|
||||
fuser_output = []
|
||||
fuser_output = ""
|
||||
if os.path.exists('/bin/fuser'):
|
||||
fuser_output = execute(["fuser", path])
|
||||
else:
|
||||
elif os.path.exists('/sbin/fuser'):
|
||||
fuser_output = execute(["/sbin/fuser", path])
|
||||
else:
|
||||
logger.warning("fuser not available, please install psmisc")
|
||||
return set(fuser_output.split())
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue