A feature-rich command-line audio/video downloader
[options] Rollback old behavior for configuratio files' encoding
Sergey M․1251565ee0ef
diff --git a/youtube_dl/options.py b/youtube_dl/options.pyindex 5302b67cc3..c4a85b2c09 100644--- a/youtube_dl/options.py+++ b/youtube_dl/options.py@@ -26,7 +26,11 @@ def parseOpts(overrideArguments=None):except IOError:return default # silently skip if file is not presenttry:- res = compat_shlex_split(optionf.read(), comments=True)+ # FIXME: https://github.com/rg3/youtube-dl/commit/dfe5fa49aed02cf36ba9f743b11b0903554b5e56+ contents = optionf.read()+ if sys.version_info < (3,):+ contents = contents.decode(preferredencoding())+ res = compat_shlex_split(contents, comments=True)finally:optionf.close()return res