do not crash if date in label regexp isn't valid
This commit is contained in:
parent
04a3995416
commit
6f95fdd800
1 changed files with 7 additions and 4 deletions
|
|
@ -147,9 +147,12 @@ class FrenchTransaction(Transaction):
|
||||||
if yy < 100:
|
if yy < 100:
|
||||||
yy += 2000
|
yy += 2000
|
||||||
|
|
||||||
if inargs('HH') and inargs('MM'):
|
try:
|
||||||
self.rdate = datetime.datetime(yy, mm, dd, int(args['HH']), int(args['MM']))
|
if inargs('HH') and inargs('MM'):
|
||||||
else:
|
self.rdate = datetime.datetime(yy, mm, dd, int(args['HH']), int(args['MM']))
|
||||||
self.rdate = datetime.date(yy, mm, dd)
|
else:
|
||||||
|
self.rdate = datetime.date(yy, mm, dd)
|
||||||
|
except ValueError, e:
|
||||||
|
self._logger.warning('Unable to date in label %r: %s' % (self.raw, e))
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue