mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-15 22:05:39 +00:00
Use compat_[filter,map]
This commit is contained in:
parent
e48a9ae20e
commit
93c7531412
1 changed files with 2 additions and 6 deletions
|
@ -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 a new issue