From 38ed13444a0576ea98ae5b15aa6422bb4d5737ec Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Date: Thu, 12 Aug 2010 18:40:36 +0200 Subject: [PATCH] Improve error message on invalid output template and abort execution --- youtube-dl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.40.0