mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-24 23:16:44 +00:00
Catch OSError exception in psutil. Fixes https://github.com/GNS3/gns3-gui/issues/3127
This commit is contained in:
parent
64f172fe20
commit
16c84e23a9
@ -231,7 +231,7 @@ Processus:
|
|||||||
try:
|
try:
|
||||||
psinfo = proc.as_dict(attrs=["name", "exe"])
|
psinfo = proc.as_dict(attrs=["name", "exe"])
|
||||||
data += "* {} {}\n".format(psinfo["name"], psinfo["exe"])
|
data += "* {} {}\n".format(psinfo["name"], psinfo["exe"])
|
||||||
except psutil.NoSuchProcess:
|
except (OSError, psutil.NoSuchProcess, psutil.AccessDenied):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
data += "\n\nProjects"
|
data += "\n\nProjects"
|
||||||
|
@ -195,7 +195,7 @@ def kill_ghosts():
|
|||||||
if name in detect_process:
|
if name in detect_process:
|
||||||
proc.kill()
|
proc.kill()
|
||||||
log.warning("Killed ghost process %s", name)
|
log.warning("Killed ghost process %s", name)
|
||||||
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
except (OSError, psutil.NoSuchProcess, psutil.AccessDenied):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user