[options] Do not decode Unicode on Python 2.x
authorPhilipp Hagemeister <phihag@phihag.de>
Thu, 7 Jul 2016 17:40:58 +0000 (19:40 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Thu, 7 Jul 2016 17:41:00 +0000 (19:41 +0200)
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)

youtube_dl/options.py

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