From e758a8b8605bc3c18b6dec4c91b17d621c153534 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 19 Jun 2001 22:37:25 +0000 Subject: [PATCH] Don't attempt to set a name of it isn't intialized svn: r165 --- src/GrampsParser.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/GrampsParser.py b/src/GrampsParser.py index aa0e0a87e..dfe4e0f9c 100644 --- a/src/GrampsParser.py +++ b/src/GrampsParser.py @@ -606,7 +606,8 @@ class GrampsParser(handler.ContentHandler): # #--------------------------------------------------------------------- def stop_last(self,tag): - self.name.Surname = u2l(tag) + if self.name: + self.name.Surname = u2l(tag) #--------------------------------------------------------------------- # @@ -614,7 +615,8 @@ class GrampsParser(handler.ContentHandler): # #--------------------------------------------------------------------- def stop_suffix(self,tag): - self.name.Suffix = u2l(tag) + if self.name: + self.name.Suffix = u2l(tag) #--------------------------------------------------------------------- # @@ -622,7 +624,8 @@ class GrampsParser(handler.ContentHandler): # #--------------------------------------------------------------------- def stop_title(self,tag): - self.name.Title = u2l(tag) + if self.name: + self.name.Title = u2l(tag) #--------------------------------------------------------------------- # @@ -630,7 +633,8 @@ class GrampsParser(handler.ContentHandler): # #--------------------------------------------------------------------- def stop_nick(self,tag): - self.person.setNickName(u2l(tag)) + if self.name: + self.person.setNickName(u2l(tag)) #--------------------------------------------------------------------- #