about summary refs log tree commit diff
path: root/youtube_dl/compat.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-06-18 03:22:08 +0700
committerSergey M․ <dstftw@gmail.com>2018-06-18 04:52:58 +0700
commit075a13d3e9e860f0033ea5a37795bebba02690b1 (patch)
tree4047a6d0cdf1e96175181abd29ae3b11cb6a93c5 /youtube_dl/compat.py
parent8ba84e4600229c9baec6410b0c0c9e500c0105b5 (diff)
downloadyoutube-dl-075a13d3e9e860f0033ea5a37795bebba02690b1.tar.gz
youtube-dl-075a13d3e9e860f0033ea5a37795bebba02690b1.tar.xz
youtube-dl-075a13d3e9e860f0033ea5a37795bebba02690b1.zip
[compat] Introduce compat_integer_types
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r--youtube_dl/compat.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py
index 4a611f183..7b770340f 100644
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@ -2787,6 +2787,12 @@ except NameError:  # Python 3
     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
@@ -2974,6 +2980,7 @@ __all__ = [
     'compat_http_client',
     'compat_http_server',
     'compat_input',
+    'compat_integer_types',
     'compat_itertools_count',
     'compat_kwargs',
     'compat_numeric_types',