Catalog generation: Ignore invalid pubdates

This commit is contained in:
Kovid Goyal 2020-02-05 07:33:10 +05:30
parent 4a574c1a0f
commit a539f24a0a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2746,7 +2746,10 @@ class CatalogBuilder(object):
# Date of publication # Date of publication
if book['date']: if book['date']:
pubdate = book['date'] pubdate = book['date']
try:
pubmonth, pubyear = pubdate.split() pubmonth, pubyear = pubdate.split()
except Exception:
pubmonth = pubyear = ''
else: else:
pubdate = pubyear = pubmonth = '' pubdate = pubyear = pubmonth = ''