projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[YoutubeDL] rework how the format spec is processed
[youtube-dl]
/
youtube_dl
/
compat.py
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index f9529210dd955932eca837aa7022696470c557ed..bc218dd719074204b3e94e7ec124f02914b28f51 100644
(file)
--- a/
youtube_dl/compat.py
+++ b/
youtube_dl/compat.py
@@
-388,6
+388,10
@@
else:
pass
return _terminal_size(columns, lines)
pass
return _terminal_size(columns, lines)
+if sys.version_info >= (3, 0):
+ from tokenize import tokenize as compat_tokenize_tokenize
+else:
+ from tokenize import generate_tokens as compat_tokenize_tokenize
__all__ = [
'compat_HTTPError',
__all__ = [
'compat_HTTPError',
@@
-408,6
+412,7
@@
__all__ = [
'compat_socket_create_connection',
'compat_str',
'compat_subprocess_get_DEVNULL',
'compat_socket_create_connection',
'compat_str',
'compat_subprocess_get_DEVNULL',
+ 'compat_tokenize_tokenize',
'compat_urllib_error',
'compat_urllib_parse',
'compat_urllib_parse_unquote',
'compat_urllib_error',
'compat_urllib_parse',
'compat_urllib_parse_unquote',