aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-07-09 07:12:52 +0700
committerSergey M․ <dstftw@gmail.com>2016-07-09 07:12:52 +0700
commit1251565ee0efd71f98d77f1eeefe3f3e38ec6f43 (patch)
tree1aa9e17f863288b88e25323424e59627a4d6a12f /youtube_dl
parent1f7258a367bfcc0d60441e38d25373a6ada6b45e (diff)
[options] Rollback old behavior for configuratio files' encoding
Until agreed with some solution
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/options.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 5302b67cc..c4a85b2c0 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 present
try:
- 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