diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2012-12-15 23:54:44 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2012-12-15 23:55:13 +0100 |
commit | 0be41ec241d8308378c134d803f6b67b93a6c8de (patch) | |
tree | e0c7a3ba8a5b0a0c897ea24c8225de3c1a84d91e /youtube_dl/__init__.py | |
parent | f1171f7c2df9551ba8c7b3b7042bfa15d2d1ea6b (diff) |
Do not decode None
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index ce4e67848..e86ac49b3 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -506,7 +506,8 @@ def _real_main(): if sys.version_info < (3,): # In Python 2, sys.argv is a bytestring (also note http://bugs.python.org/issue2128 for Windows systems) - opts.outtmpl = opts.outtmpl.decode(preferredencoding()) + if opts.outtmpl is not None: + opts.outtmpl = opts.outtmpl.decode(preferredencoding()) outtmpl =((opts.outtmpl is not None and opts.outtmpl) or (opts.format == '-1' and opts.usetitle and u'%(title)s-%(id)s-%(format)s.%(ext)s') or (opts.format == '-1' and u'%(id)s-%(format)s.%(ext)s') |