python3: Ensure ConfigOpts __iter__ uses list(d.keys())
d.keys() no longer returns a copy of the keys in Python 3. This is part of PEP 3106. Change-Id: Ie4897109c87d6dc2952c2eb35b83fe368fb31803 Closes-Bug: #1796163
This commit is contained in:
parent
e22a002f43
commit
1884c307a9
|
@ -2649,7 +2649,8 @@ class ConfigOpts(collections.Mapping):
|
|||
|
||||
def __iter__(self):
|
||||
"""Iterate over all registered opt and group names."""
|
||||
for key in itertools.chain(self._opts.keys(), self._groups.keys()):
|
||||
for key in itertools.chain(list(self._opts.keys()),
|
||||
list(self._groups.keys())):
|
||||
yield key
|
||||
|
||||
def __len__(self):
|
||||
|
|
Loading…
Reference in New Issue