Try and catch if processes no longer exist

This commit is contained in:
Nicolargo 2014-09-09 23:47:59 +02:00
parent f601b58b07
commit 9b0cbc5603
2 changed files with 2 additions and 2 deletions

View File

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

View File

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