mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-15 20:38:17 -04:00
Add one more catch to the processes grab - issue #414
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
"""Init the Glances software."""
|
||||
|
||||
__appname__ = 'glances'
|
||||
__version__ = '2.1_RC11'
|
||||
__version__ = '2.1_RC12'
|
||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||
__license__ = 'LGPL'
|
||||
|
||||
|
||||
@@ -173,8 +173,9 @@ class GlancesProcesses(object):
|
||||
# Get the process IO counters
|
||||
proc_io = proc.io_counters()
|
||||
io_new = [proc_io.read_bytes, proc_io.write_bytes]
|
||||
except psutil.AccessDenied:
|
||||
except (psutil.AccessDenied, psutil.NoSuchProcess):
|
||||
# Access denied to process IO (no root account)
|
||||
# NoSuchProcess (process die between first and second grab)
|
||||
# Put 0 in all values (for sort) and io_tag = 0 (for display)
|
||||
procstat['io_counters'] = [0, 0] + [0, 0]
|
||||
io_tag = 0
|
||||
|
||||
Reference in New Issue
Block a user