commit d013b2671977c58b7ee954589351ba596fe59179
parent a0904c5d8024c12b7f95b1126a6b8152a4e1021f
Author: Sergey M <dstftw@gmail.com>
Date: Sat, 7 May 2016 18:09:51 +0000
Merge pull request #9430 from kdeldycke/batch_file_home_expansion
Expand user's home in batch file path.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
@@ -86,7 +86,9 @@ def _real_main(argv=None):
if opts.batchfile == '-':
batchfd = sys.stdin
else:
- batchfd = io.open(opts.batchfile, 'r', encoding='utf-8', errors='ignore')
+ batchfd = io.open(
+ compat_expanduser(opts.batchfile),
+ 'r', encoding='utf-8', errors='ignore')
batch_urls = read_batch_urls(batchfd)
if opts.verbose:
write_string('[debug] Batch file urls: ' + repr(batch_urls) + '\n')