diff options
author | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-11-27 23:15:33 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2012-11-27 23:15:33 +0100 |
commit | f462df021a881c406afefc62bbf905ea582700ea (patch) | |
tree | 6adaad43c750f74865e4402c8ee09c31e54222ca /youtube_dl/FileDownloader.py | |
parent | 03c5b0fbd4de40ebf21a7ba2e389fb5fba50666c (diff) |
Use None on missing required info_dict fields
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r-- | youtube_dl/FileDownloader.py | 1 |
1 files changed, 1 insertions, 0 deletions
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: |