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:
|
||||
yy += 2000
|
||||
|
||||
if inargs('HH') and inargs('MM'):
|
||||
self.rdate = datetime.datetime(yy, mm, dd, int(args['HH']), int(args['MM']))
|
||||
else:
|
||||
self.rdate = datetime.date(yy, mm, dd)
|
||||
try:
|
||||
if inargs('HH') and inargs('MM'):
|
||||
self.rdate = datetime.datetime(yy, mm, dd, int(args['HH']), int(args['MM']))
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue