1. rg3
  2. youtube-dl


rg3  committed aa4798e

Improve error message on invalid output template and abort execution

  • Participants
  • Parent commits a8f6324
  • Branches default

Comments (0)

Files changed (1)

File youtube-dl

View file
  • Ignore whitespace
 			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)