Catch invalid date exceptions, and continue on
svn: r11
This commit is contained in:
parent
1c77a167f5
commit
592555d88c
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user