1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Catch OSError exception in psutil. Fixes https://github.com/GNS3/gns3-gui/issues/3127

This commit is contained in:
grossmj 2021-02-15 15:57:24 +10:30
parent 64f172fe20
commit 16c84e23a9
2 changed files with 2 additions and 2 deletions

View File

@ -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"

View File

@ -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