Catch invalid date exceptions, and continue on
svn: r11
This commit is contained in:
parent
39a550d779
commit
6370d5c85f
@ -332,7 +332,10 @@ def importData(database, filename):
|
||||
regex_match = dateRegexp.match(line)
|
||||
if regex_match :
|
||||
matches = regex_match.groups()
|
||||
event.setDate(matches[0])
|
||||
try:
|
||||
event.setDate(matches[0])
|
||||
except:
|
||||
pass
|
||||
continue
|
||||
|
||||
regex_match = typeRegexp.match(line)
|
||||
@ -530,7 +533,10 @@ def importData(database, filename):
|
||||
regex_match = dateRegexp.match(line)
|
||||
if regex_match :
|
||||
matches = regex_match.groups()
|
||||
event.setDate(matches[0])
|
||||
try:
|
||||
event.setDate(matches[0])
|
||||
except:
|
||||
pass
|
||||
continue
|
||||
|
||||
regex_match = fileRegexp.match(line)
|
||||
|
Loading…
Reference in New Issue
Block a user