summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-08-12 18:40:36 +0200
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>2010-10-31 11:28:40 +0100
commit38ed13444a0576ea98ae5b15aa6422bb4d5737ec (patch)
treebf50eb25267ff38707ceed3cda74638859211d43
parent8a9f53bebfeeb546ea0222098c64add781cb50b8 (diff)
downloadyoutube-dl-38ed13444a0576ea98ae5b15aa6422bb4d5737ec.tar.gz
youtube-dl-38ed13444a0576ea98ae5b15aa6422bb4d5737ec.tar.xz
youtube-dl-38ed13444a0576ea98ae5b15aa6422bb4d5737ec.zip
Improve error message on invalid output template and abort execution
-rwxr-xr-xyoutube-dl3
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