Issue #8496: make mailcap.lookup() always return a list, rather than an iterator.

Patch by Gregory Nofi.
This commit is contained in:
Antoine Pitrou 2010-04-22 13:30:10 +00:00
parent 945c17f5ec
commit 7062db8a99
2 changed files with 4 additions and 1 deletions

View File

@ -164,7 +164,7 @@ def lookup(caps, MIMEtype, key=None):
if MIMEtype in caps:
entries = entries + caps[MIMEtype]
if key is not None:
entries = filter(lambda e, key=key: key in e, entries)
entries = [e for e in entries if key in e]
return entries
def subst(field, MIMEtype, filename, plist=[]):

View File

@ -326,6 +326,9 @@ C-API
Library
-------
- Issue #8496: make mailcap.lookup() always return a list, rather than an
iterator. Patch by Gregory Nofi.
- Issue #8195: Fix a crash in sqlite Connection.create_collation() if the
collation name contains a surrogate character.