From 6370d5c85fb58d6447c6a3689dec95740536569e 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 --- gramps/src/plugins/ReadGedcom.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gramps/src/plugins/ReadGedcom.py b/gramps/src/plugins/ReadGedcom.py index c5d531947..0c6ecbefd 100644 --- a/gramps/src/plugins/ReadGedcom.py +++ b/gramps/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)