mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-03 07:03:40 +03:00
fix on macOS when value is NoneType when compute the max values
This commit is contained in:
parent
91647bb5d1
commit
d9c9cfe911
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user