From f462df021a881c406afefc62bbf905ea582700ea Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Tue, 27 Nov 2012 23:15:33 +0100 Subject: Use None on missing required info_dict fields --- youtube_dl/FileDownloader.py | 1 + 1 file changed, 1 insertion(+) (limited to 'youtube_dl/FileDownloader.py') diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 1fdd2071f..a7997c4f2 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -327,6 +327,7 @@ class FileDownloader(object): template_dict = dict(info_dict) template_dict['epoch'] = unicode(int(time.time())) template_dict['autonumber'] = unicode('%05d' % self._num_downloads) + template_dict = dict((key, u'NA' if val is None else val) for key, val in template_dict.items()) filename = self.params['outtmpl'] % template_dict return filename except (ValueError, KeyError), err: -- cgit v1.2.3