add an error if unable to parse date

This commit is contained in:
Romain Bignon 2013-01-03 19:40:56 +01:00
commit b0cc8cfacf

View file

@ -104,6 +104,9 @@ class TransactionsPage(BasePage):
yy = d.year
date = datetime.date(yy, mm, dd)
else:
self.logger.error('Unable to parse date %r' % date)
continue
t.parse(date, re.sub(r'[ ]+', ' ', raw))
t.amount = Decimal(div.xpath('.//span')[-1].text.strip().replace(' ', '').replace(',', ''))