KeyError: 'memory_info' on stats sum #1188

pull/1223/head
nicolargo 2017-11-16 20:53:25 +01:00
parent 9c3c4baf5a
commit 6260f193cd
2 changed files with 4 additions and 0 deletions

1
NEWS
View File

@ -24,6 +24,7 @@ Bugs corrected:
* Add missing mount-observe and system-observe interfaces #1179 * Add missing mount-observe and system-observe interfaces #1179
* OS specific arguments should be documented and reported #1180 * OS specific arguments should be documented and reported #1180
* 'ascii' codec can't encode character u'\U0001f4a9' in position 4: ordinal not in range(128) #1185 * 'ascii' codec can't encode character u'\U0001f4a9' in position 4: ordinal not in range(128) #1185
* KeyError: 'memory_info' on stats sum #1188
Backward-incompatible changes: Backward-incompatible changes:

View File

@ -605,6 +605,9 @@ class Plugin(GlancesPlugin):
# Compute stats summary # Compute stats summary
ret = 0 ret = 0
for p in self.stats: for p in self.stats:
if key not in p:
# Correct issue #1188
continue
if indice is None: if indice is None:
ret += p[key] ret += p[key]
else: else: