From 592555d88cd1a082b3973560308cbddea0380bc5 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 14 May 2001 23:51:49 +0000 Subject: [PATCH] Catch invalid date exceptions, and continue on svn: r11 --- src/plugins/ReadGedcom.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/ReadGedcom.py b/src/plugins/ReadGedcom.py index c5d531947..0c6ecbefd 100644 --- a/src/plugins/ReadGedcom.py +++ b/src/plugins/ReadGedcom.py @@ -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)