[options] Accept quoted string across multiple lines (#9940)

Like:

    -f "
    bestvideo+bestaudio/
    best
    "
This commit is contained in:
Jaime Marquínez Ferrándiz 2016-06-29 14:56:05 +02:00
parent 97124e572d
commit 17b21446ae

View File

@ -26,9 +26,7 @@ def parseOpts(overrideArguments=None):
except IOError:
return default # silently skip if file is not present
try:
res = []
for l in optionf:
res += compat_shlex_split(l, comments=True)
res = compat_shlex_split(optionf.read(), comments=True)
finally:
optionf.close()
return res