diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 77241751e..bc2ba7228 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -7,6 +7,8 @@ * src/edit_person.glade: Add notes format radiobuttons. * src/EditPerson.py: Support format for the person's notes. * src/RelLib.py: More support for the notes' format. + * src/plugins/ReadGedcom.py: Add an "Unknown" address when + parsing an incorrect PHON field. 2003-12-10 Tim Waugh * doc/omf.make: Fixed DESTDIR support. diff --git a/gramps2/src/plugins/ReadGedcom.py b/gramps2/src/plugins/ReadGedcom.py index 06c4fb39b..fa2231bcd 100644 --- a/gramps2/src/plugins/ReadGedcom.py +++ b/gramps2/src/plugins/ReadGedcom.py @@ -795,6 +795,11 @@ class GedcomParser: addr.setStreet(matches[2] + self.parse_continue_data(1)) self.parse_address(addr,2) self.person.addAddress(addr) + elif matches[1] == "PHON": + addr = RelLib.Address() + addr.setStreet("Unknown") + addr.setPhone(matches[2]) + self.person.addAddress(addr) elif matches[1] == "BIRT": event = RelLib.Event() if self.person.getBirth().getDate() != "" or \ @@ -1054,6 +1059,9 @@ class GedcomParser: elif matches[1] == "PLAC": address.setStreet(matches[2]) self.parse_address(address,level+1) + elif matches[1] == "PHON": + address.setStreet("Unknown") + address.setPhone(matches[2]) elif matches[1] == "NOTE": note = self.parse_note(matches,address,level+1,note) else: