mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-07 12:00:09 +09:00
Use compat_[filter,map]
This commit is contained in:
parent
e48a9ae20e
commit
93c7531412
@ -27,6 +27,8 @@ import re
|
||||
|
||||
import youtube_dl.YoutubeDL
|
||||
from youtube_dl.compat import (
|
||||
compat_filter as filter,
|
||||
compat_map as map,
|
||||
compat_http_client,
|
||||
compat_urllib_error,
|
||||
compat_HTTPError,
|
||||
@ -279,12 +281,6 @@ for n, test_case in enumerate(defs):
|
||||
ie_list = ','.join(test_case.get('add_ie', []))
|
||||
TestDownload.addTest(test_method, tname, ie_list)
|
||||
|
||||
# Py2 compat (should be in compat.py?)
|
||||
try:
|
||||
from itertools import (ifilter as filter, imap as map)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
def tests_for_ie(ie_key):
|
||||
return filter(
|
||||
|
Loading…
Reference in New Issue
Block a user