diff options
Diffstat (limited to 'youtube_dl/options.py')
-rw-r--r-- | youtube_dl/options.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py index 4e6e47d6f..8e80e3759 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -13,6 +13,7 @@ from .compat import ( compat_kwargs, ) from .utils import ( + preferredencoding, write_string, ) from .version import __version__ @@ -794,6 +795,11 @@ def parseOpts(overrideArguments=None): write_string('[debug] Override config: ' + repr(overrideArguments) + '\n') else: command_line_conf = sys.argv[1:] + # Workaround for Python 2.x, where argv is a byte list + if sys.version_info < (3,): + command_line_conf = [ + a.decode(preferredencoding(), 'replace') for a in command_line_conf] + if '--ignore-config' in command_line_conf: system_conf = [] user_conf = [] |