mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-28 11:41:46 +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."""
|
"""Init the Glances software."""
|
||||||
|
|
||||||
__appname__ = 'glances'
|
__appname__ = 'glances'
|
||||||
__version__ = '2.1_RC10'
|
__version__ = '2.1_RC11'
|
||||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||||
__license__ = 'LGPL'
|
__license__ = 'LGPL'
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ class GlancesProcesses(object):
|
|||||||
try:
|
try:
|
||||||
self.username_cache[procstat['pid']] = proc.username()
|
self.username_cache[procstat['pid']] = proc.username()
|
||||||
except psutil.NoSuchProcess:
|
except psutil.NoSuchProcess:
|
||||||
pass
|
self.username_cache[procstat['pid']] = "?"
|
||||||
except (KeyError, psutil.AccessDenied):
|
except (KeyError, psutil.AccessDenied):
|
||||||
try:
|
try:
|
||||||
self.username_cache[procstat['pid']] = proc.uids().real
|
self.username_cache[procstat['pid']] = proc.uids().real
|
||||||
|
Loading…
Reference in New Issue
Block a user