Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[options] Accept quoted string across multiple lines (#9940)
Browse files Browse the repository at this point in the history
Like:

    -f "
    bestvideo+bestaudio/
    best
    "
jaimeMF committed Jun 29, 2016
1 parent 97124e5 commit 17b2144
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions youtube_dl/options.py
Original file line number Diff line number Diff line change
@@ -26,9 +26,7 @@ def _readOptions(filename_bytes, default=[]):
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

0 comments on commit 17b2144

Please sign in to comment.