diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-08-12 18:40:36 +0200 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-31 11:28:40 +0100 |
commit | 38ed13444a0576ea98ae5b15aa6422bb4d5737ec (patch) | |
tree | bf50eb25267ff38707ceed3cda74638859211d43 | |
parent | 8a9f53bebfeeb546ea0222098c64add781cb50b8 (diff) | |
download | youtube-dl-38ed13444a0576ea98ae5b15aa6422bb4d5737ec.tar.xz |
Improve error message on invalid output template and abort execution
-rwxr-xr-x | youtube-dl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl index b41b57ea8..727fadea4 100755 --- a/youtube-dl +++ b/youtube-dl @@ -404,7 +404,8 @@ class FileDownloader(object): template_dict['ord'] = unicode('%05d' % self._num_downloads) filename = self.params['outtmpl'] % template_dict except (ValueError, KeyError), err: - self.trouble('ERROR: invalid output template or system charset: %s' % str(err)) + self.trouble(u'ERROR: invalid system charset or erroneous output template') + return if self.params.get('nooverwrites', False) and os.path.exists(filename): self.to_stderr(u'WARNING: file exists: %s; skipping' % filename) return |