1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-07 11:42:43 +01:00

[options] Do not decode Unicode on Python 2.x

The configuration file contents are being returned as unicode now, so decoding them is no longer necessary.
(Run python2 with -3 to see the warning before this commit)
This commit is contained in:
Philipp Hagemeister 2016-07-07 19:40:58 +02:00
parent 571808a7aa
commit 30d22dae8e

View File

@ -812,11 +812,11 @@ def compat_conf(conf):
system_conf = [] system_conf = []
user_conf = [] user_conf = []
else: else:
system_conf = compat_conf(_readOptions('/etc/youtube-dl.conf')) system_conf = _readOptions('/etc/youtube-dl.conf')
if '--ignore-config' in system_conf: if '--ignore-config' in system_conf:
user_conf = [] user_conf = []
else: else:
user_conf = compat_conf(_readUserConf()) user_conf = _readUserConf()
argv = system_conf + user_conf + command_line_conf argv = system_conf + user_conf + command_line_conf
opts, args = parser.parse_args(argv) opts, args = parser.parse_args(argv)