mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +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:
|
||||
psinfo = proc.as_dict(attrs=["name", "exe"])
|
||||
data += "* {} {}\n".format(psinfo["name"], psinfo["exe"])
|
||||
except psutil.NoSuchProcess:
|
||||
except (OSError, psutil.NoSuchProcess, psutil.AccessDenied):
|
||||
pass
|
||||
|
||||
data += "\n\nProjects"
|
||||
|
@ -195,7 +195,7 @@ def kill_ghosts():
|
||||
if name in detect_process:
|
||||
proc.kill()
|
||||
log.warning("Killed ghost process %s", name)
|
||||
except (psutil.NoSuchProcess, psutil.AccessDenied):
|
||||
except (OSError, psutil.NoSuchProcess, psutil.AccessDenied):
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user