mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-27 19:25:27 +03:00
Try and catch if processes no longer exist
This commit is contained in:
parent
f601b58b07
commit
9b0cbc5603
@ -20,7 +20,7 @@
|
||||
"""Init the Glances software."""
|
||||
|
||||
__appname__ = 'glances'
|
||||
__version__ = '2.1_RC10'
|
||||
__version__ = '2.1_RC11'
|
||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||
__license__ = 'LGPL'
|
||||
|
||||
|
@ -202,7 +202,7 @@ class GlancesProcesses(object):
|
||||
try:
|
||||
self.username_cache[procstat['pid']] = proc.username()
|
||||
except psutil.NoSuchProcess:
|
||||
pass
|
||||
self.username_cache[procstat['pid']] = "?"
|
||||
except (KeyError, psutil.AccessDenied):
|
||||
try:
|
||||
self.username_cache[procstat['pid']] = proc.uids().real
|
||||
|
Loading…
Reference in New Issue
Block a user