projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ba84e4
)
[compat] Introduce compat_integer_types
author
Sergey M․
<dstftw@gmail.com>
Sun, 17 Jun 2018 20:22:08 +0000
(
03:22
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 17 Jun 2018 21:52:58 +0000
(
04:52
+0700)
youtube_dl/compat.py
patch
|
blob
|
history
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index 4a611f183408ce224404c2fce360ee4d50792dac..7b770340ff4316a1d6710fc4f37cb912d62bfb9a 100644
(file)
--- a/
youtube_dl/compat.py
+++ b/
youtube_dl/compat.py
@@
-2787,6
+2787,12
@@
except NameError: # Python 3
compat_numeric_types = (int, float, complex)
compat_numeric_types = (int, float, complex)
+try:
+ compat_integer_types = (int, long)
+except NameError: # Python 3
+ compat_integer_types = (int, )
+
+
if sys.version_info < (2, 7):
def compat_socket_create_connection(address, timeout, source_address=None):
host, port = address
if sys.version_info < (2, 7):
def compat_socket_create_connection(address, timeout, source_address=None):
host, port = address
@@
-2974,6
+2980,7
@@
__all__ = [
'compat_http_client',
'compat_http_server',
'compat_input',
'compat_http_client',
'compat_http_server',
'compat_input',
+ 'compat_integer_types',
'compat_itertools_count',
'compat_kwargs',
'compat_numeric_types',
'compat_itertools_count',
'compat_kwargs',
'compat_numeric_types',