diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-22 13:30:10 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-22 13:30:10 (GMT) |
commit | 7062db8a999e00fe6449b1f620801b5a857117b7 (patch) | |
tree | 5ae485dd57af8790ea28c3774ad47216f1a4f73e /Lib/mailcap.py | |
parent | 945c17f5ec2b61d200be5114bc3ef37cd1bdd391 (diff) | |
download | cpython-7062db8a999e00fe6449b1f620801b5a857117b7.zip cpython-7062db8a999e00fe6449b1f620801b5a857117b7.tar.gz cpython-7062db8a999e00fe6449b1f620801b5a857117b7.tar.bz2 |
Issue #8496: make mailcap.lookup() always return a list, rather than an iterator.
Patch by Gregory Nofi.
Diffstat (limited to 'Lib/mailcap.py')
-rw-r--r-- | Lib/mailcap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/mailcap.py b/Lib/mailcap.py index bc93026..4ae13d7 100644 --- a/Lib/mailcap.py +++ b/Lib/mailcap.py @@ -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=[]): |