mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Another catch for NoSuchProcess - Correct issue #414
This commit is contained in:
parent
bc660feb2e
commit
0669dcb189
@ -149,8 +149,12 @@ class GlancesProcesses(object):
|
||||
procstat['mandatory_stats'] = True
|
||||
|
||||
# Process CPU, MEM percent and name
|
||||
try:
|
||||
procstat.update(
|
||||
proc.as_dict(attrs=['cpu_percent', 'memory_percent', 'name'], ad_value=''))
|
||||
except psutil.NoSuchProcess:
|
||||
# Correct issue #414
|
||||
return None
|
||||
if procstat['cpu_percent'] == '' or procstat['memory_percent'] == '':
|
||||
# Do not display process if we can not get the basic
|
||||
# cpu_percent or memory_percent stats
|
||||
|
Loading…
Reference in New Issue
Block a user