projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[compat] Add compat_input
[youtube-dl]
/
youtube_dl
/
compat.py
diff --git
a/youtube_dl/compat.py
b/youtube_dl/compat.py
index 06e5f3ff63ee644807fac38bb1859eb5b17ed75b..fabac9fd2400240d4da0da3b355a6926408cc283 100644
(file)
--- 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):