aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2014-09-30 22:27:53 +0700
committerSergey M․ <dstftw@gmail.com>2014-09-30 22:27:53 +0700
commit4644ac5527e48a1a8c48dc790621c73913e6dbf8 (patch)
tree3ff5c762d57d8d07755959b442457821d13fdc90 /youtube_dl/__init__.py
parente497a7f2ca46d485c2839969abc598faa16c49dc (diff)
[core] Decode environment variables with filesystem encoding (Fixes #3854, Fixes #3217, Fixes #2918)
Introduces compat versions of os.getenv and os.path.expanduser
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 7f2b4dfcc..e73bc5c37 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -94,6 +94,7 @@ from .options import (
parseOpts,
)
from .utils import (
+ compat_expanduser,
compat_getpass,
compat_print,
DateRange,
@@ -285,7 +286,7 @@ def _real_main(argv=None):
u' template'.format(outtmpl))
any_printing = opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat or opts.getduration or opts.dumpjson
- download_archive_fn = os.path.expanduser(opts.download_archive) if opts.download_archive is not None else opts.download_archive
+ download_archive_fn = compat_expanduser(opts.download_archive) if opts.download_archive is not None else opts.download_archive
ydl_opts = {
'usenetrc': opts.usenetrc,