aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/compat.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-06-05 00:43:55 +0700
committerSergey M․ <dstftw@gmail.com>2016-06-05 00:43:55 +0700
commit1ae6c83bceb6dbc7093fe35ddafcde08dd0151a6 (patch)
treeab862e3a1c6be2c125cae132b6201e3bf2cef123 /youtube_dl/compat.py
parent0fc832e1b2c8f48298e135d42818a16bfba4d3ed (diff)
[compat] Add compat_input
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r--youtube_dl/compat.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py
index 06e5f3ff6..fabac9fd2 100644
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@ -482,6 +482,11 @@ if sys.version_info < (3, 0) and sys.platform == 'win32':
else:
compat_getpass = getpass.getpass
+try:
+ compat_input = raw_input
+except NameError: # Python 3
+ compat_input = input
+
# Python < 2.6.5 require kwargs to be bytes
try:
def _testfunc(x):