mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-22 08:41:32 +03:00
Merge pull request #1236 from spike008t/fix/develop-python3-macos
fix on macOS when value is NoneType when compute the max values
This commit is contained in:
commit
2cdc9b0b3d
@ -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