diff options
author | Tatsuyuki Ishi <ishitatsuyuki@gmail.com> | 2017-09-06 11:24:34 +0900 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-09-23 05:36:57 +0700 |
commit | 2384f5a64e501d7abb844e8d31fe340b34d8d4e7 (patch) | |
tree | 9680e417e3ee7690ffabe099b95abdccdefd0936 /youtube_dl/compat.py | |
parent | 8c2895305dc09920055611c8120f5a65fcd2614f (diff) |
[mixcloud] Fix extraction (closes #14088)
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r-- | youtube_dl/compat.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index 9e4e13bcf..2a62248ef 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -6,6 +6,7 @@ import collections import email import getpass import io +import itertools import optparse import os import re @@ -15,7 +16,6 @@ import socket import struct import subprocess import sys -import itertools import xml.etree.ElementTree @@ -2898,6 +2898,13 @@ else: compat_struct_pack = struct.pack compat_struct_unpack = struct.unpack +try: + from future_builtins import zip as compat_zip +except ImportError: # not 2.6+ or is 3.x + try: + from itertools import izip as compat_zip # < 2.5 or 3.x + except ImportError: + compat_zip = zip __all__ = [ 'compat_HTMLParseError', @@ -2948,5 +2955,6 @@ __all__ = [ 'compat_urlretrieve', 'compat_xml_parse_error', 'compat_xpath', + 'compat_zip', 'workaround_optparse_bug9161', ] |