mirror of https://github.com/nicolargo/glances.git
glances: remove iterator helpers
No more needed in Python 3. Following commit 72e1511d ("globals: Fix a
race condition in namedtuple_to_dict"), the dynamic view on the keys is
as well transformed into a list.
Related to #3181
This commit is contained in:
parent
239d5f7db6
commit
1375573a46
|
|
@ -17,7 +17,6 @@ from glances.globals import (
|
|||
MACOS,
|
||||
WINDOWS,
|
||||
dictlist_first_key_value,
|
||||
iterkeys,
|
||||
list_of_namedtuple_to_list_of_dict,
|
||||
namedtuple_to_dict,
|
||||
)
|
||||
|
|
@ -157,7 +156,7 @@ class GlancesProcesses:
|
|||
self.processcount['pid_max'] = self.pid_max
|
||||
# For each key in the processcount dict
|
||||
# count the number of processes with the same status
|
||||
for k in iterkeys(self.processcount):
|
||||
for k in list(self.processcount.keys()):
|
||||
self.processcount[k] = len(list(filter(lambda v: v.get('status', '?') is k, plist)))
|
||||
# Compute thread
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in New Issue