Catch invalid date exceptions, and continue on

svn: r11
This commit is contained in:
Don Allingham 2001-05-14 23:51:49 +00:00
parent 39a550d779
commit 6370d5c85f

View File

@ -332,7 +332,10 @@ def importData(database, filename):
regex_match = dateRegexp.match(line) regex_match = dateRegexp.match(line)
if regex_match : if regex_match :
matches = regex_match.groups() matches = regex_match.groups()
event.setDate(matches[0]) try:
event.setDate(matches[0])
except:
pass
continue continue
regex_match = typeRegexp.match(line) regex_match = typeRegexp.match(line)
@ -530,7 +533,10 @@ def importData(database, filename):
regex_match = dateRegexp.match(line) regex_match = dateRegexp.match(line)
if regex_match : if regex_match :
matches = regex_match.groups() matches = regex_match.groups()
event.setDate(matches[0]) try:
event.setDate(matches[0])
except:
pass
continue continue
regex_match = fileRegexp.match(line) regex_match = fileRegexp.match(line)