Add try/except for NoSuchProcess error - issue #421

This commit is contained in:
Nicolas Hennion 2014-09-19 11:59:46 +02:00
parent 4521f2aa0b
commit 1818c4fbed

View File

@ -155,7 +155,7 @@ class GlancesProcesses(object):
# Patch for issue #391
try:
self.cmdline_cache[procstat['pid']] = ' '.join(proc.cmdline())
except (AttributeError, psutil.AccessDenied, UnicodeDecodeError):
except (AttributeError, UnicodeDecodeError, psutil.AccessDenied, psutil.NoSuchProcess):
self.cmdline_cache[procstat['pid']] = ""
procstat['cmdline'] = self.cmdline_cache[procstat['pid']]