Catch invalid date exceptions, and continue on
svn: r11
This commit is contained in:
@ -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()
|
||||||
|
try:
|
||||||
event.setDate(matches[0])
|
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()
|
||||||
|
try:
|
||||||
event.setDate(matches[0])
|
event.setDate(matches[0])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
continue
|
continue
|
||||||
|
|
||||||
regex_match = fileRegexp.match(line)
|
regex_match = fileRegexp.match(line)
|
||||||
|
Reference in New Issue
Block a user