未验证 提交 2cdc9b0b 编写于 作者: N Nicolas Hennion 提交者: GitHub

Merge pull request #1236 from spike008t/fix/develop-python3-macos

fix on macOS when value is NoneType when compute the max values
......@@ -359,7 +359,8 @@ class GlancesProcesses(object):
# Compute the maximum value for keys in self._max_values_list (CPU, MEM)
for k in self._max_values_list:
if self.processlist != []:
self.set_max_values(k, max(i[k] for i in self.processlist))
self.set_max_values(k, max(i[k] for i in self.processlist
if not (i[k] == None)))
def getcount(self):
"""Get the number of processes."""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册