Make both items() methods return lists; one had changed to return an

iterator where it probably shouldn't have.
Closes SF bug #818861.
This commit is contained in:
Fred Drake 2003-10-21 16:45:00 +00:00
parent de05032cc9
commit 8c4da53afe
1 changed files with 4 additions and 5 deletions

View File

@ -542,12 +542,11 @@ class ConfigParser(RawConfigParser):
if "__name__" in options:
options.remove("__name__")
if raw:
for option in options:
yield (option, d[option])
return [(option, d[option])
for option in options]
else:
for option in options:
yield (option,
self._interpolate(section, option, d[option], d))
return [(option, self._interpolate(section, option, d[option], d))
for option in options]
def _interpolate(self, section, option, rawval, vars):
# do the string interpolation