* src/plugins/ReadGedcom.py: Add an "Unknown" address when

parsing an incorrect PHON field.


svn: r2499
This commit is contained in:
Alex Roitman 2003-12-10 20:05:02 +00:00
parent f7c3abd63c
commit 44efe8b303
2 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,8 @@
* src/edit_person.glade: Add notes format radiobuttons. * src/edit_person.glade: Add notes format radiobuttons.
* src/EditPerson.py: Support format for the person's notes. * src/EditPerson.py: Support format for the person's notes.
* src/RelLib.py: More support for the notes' format. * 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 <twaugh@redhat.com> 2003-12-10 Tim Waugh <twaugh@redhat.com>
* doc/omf.make: Fixed DESTDIR support. * doc/omf.make: Fixed DESTDIR support.

View File

@ -795,6 +795,11 @@ class GedcomParser:
addr.setStreet(matches[2] + self.parse_continue_data(1)) addr.setStreet(matches[2] + self.parse_continue_data(1))
self.parse_address(addr,2) self.parse_address(addr,2)
self.person.addAddress(addr) 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": elif matches[1] == "BIRT":
event = RelLib.Event() event = RelLib.Event()
if self.person.getBirth().getDate() != "" or \ if self.person.getBirth().getDate() != "" or \
@ -1054,6 +1059,9 @@ class GedcomParser:
elif matches[1] == "PLAC": elif matches[1] == "PLAC":
address.setStreet(matches[2]) address.setStreet(matches[2])
self.parse_address(address,level+1) self.parse_address(address,level+1)
elif matches[1] == "PHON":
address.setStreet("Unknown")
address.setPhone(matches[2])
elif matches[1] == "NOTE": elif matches[1] == "NOTE":
note = self.parse_note(matches,address,level+1,note) note = self.parse_note(matches,address,level+1,note)
else: else: