2007-10-05 Benny Malengier <benny.malengier@gramps-project.org>
* src/GrampsDb/_ReadGedcom.py: issue #1169, wrong GEDCOM parse ADDR svn: r9080
This commit is contained in:
parent
cf5ae68625
commit
5bdeeeb762
@ -1,3 +1,6 @@
|
|||||||
|
2007-10-05 Benny Malengier <benny.malengier@gramps-project.org>
|
||||||
|
* src/GrampsDb/_ReadGedcom.py: issue #1169, wrong GEDCOM parse ADDR
|
||||||
|
|
||||||
2007-10-05 James G. Sack <jgsack@san.rr.com>
|
2007-10-05 James G. Sack <jgsack@san.rr.com>
|
||||||
* src/GrampsDb/_GrampsDbBase.py:
|
* src/GrampsDb/_GrampsDbBase.py:
|
||||||
* src/GrampsDb/_GrampsGEDDB.py:
|
* src/GrampsDb/_GrampsGEDDB.py:
|
||||||
|
@ -1042,7 +1042,7 @@ class GedcomParser(UpdateCallback):
|
|||||||
matches = self.get_next()
|
matches = self.get_next()
|
||||||
key = matches[2].strip()
|
key = matches[2].strip()
|
||||||
if matches[0] < 0 or matches[1] == TOKEN_TRLR:
|
if matches[0] < 0 or matches[1] == TOKEN_TRLR:
|
||||||
self.backup()
|
self.backup()
|
||||||
break
|
break
|
||||||
if key in ("FAM","FAMILY"):
|
if key in ("FAM","FAMILY"):
|
||||||
self.parse_FAM(matches)
|
self.parse_FAM(matches)
|
||||||
@ -1325,9 +1325,9 @@ class GedcomParser(UpdateCallback):
|
|||||||
a.set_value(matches[2])
|
a.set_value(matches[2])
|
||||||
self.family.add_attribute(a)
|
self.family.add_attribute(a)
|
||||||
else:
|
else:
|
||||||
if matches[1] not in (TOKEN_ENDL, TOKEN_BAPL, TOKEN_CONL):
|
if matches[1] not in (TOKEN_ENDL, TOKEN_BAPL, TOKEN_CONL):
|
||||||
func = self.family_func.get(matches[1], self.func_family_event)
|
func = self.family_func.get(matches[1], self.func_family_event)
|
||||||
func(self.family, matches, 2)
|
func(self.family, matches, 2)
|
||||||
|
|
||||||
# handle addresses attached to families
|
# handle addresses attached to families
|
||||||
if self.addr != None:
|
if self.addr != None:
|
||||||
@ -1557,7 +1557,7 @@ class GedcomParser(UpdateCallback):
|
|||||||
# reference to a named note defined elsewhere
|
# reference to a named note defined elsewhere
|
||||||
if matches[2] and matches[2][0] == "@":
|
if matches[2] and matches[2][0] == "@":
|
||||||
note_obj = self.note_map.get(matches[2])
|
note_obj = self.note_map.get(matches[2])
|
||||||
note = note_obj.get()
|
note = note_obj.get()
|
||||||
else:
|
else:
|
||||||
note = matches[2]
|
note = matches[2]
|
||||||
self.ignore_sub_junk(level+1)
|
self.ignore_sub_junk(level+1)
|
||||||
@ -1969,14 +1969,12 @@ class GedcomParser(UpdateCallback):
|
|||||||
if place_handle:
|
if place_handle:
|
||||||
place = self.db.get_place_from_handle(place_handle)
|
place = self.db.get_place_from_handle(place_handle)
|
||||||
main_loc = place.get_main_location()
|
main_loc = place.get_main_location()
|
||||||
try:
|
if main_loc and location and \
|
||||||
if main_loc and main_loc.get_street() != location.get_street():
|
main_loc.get_street() != location.get_street():
|
||||||
old_title = place.get_title()
|
old_title = place.get_title()
|
||||||
place = self.find_or_create_place(index)
|
place = self.find_or_create_place(index)
|
||||||
place.set_title(old_title)
|
place.set_title(old_title)
|
||||||
place_handle = place.handle
|
place_handle = place.handle
|
||||||
except:
|
|
||||||
print matches
|
|
||||||
else:
|
else:
|
||||||
place = self.find_or_create_place(index)
|
place = self.find_or_create_place(index)
|
||||||
place.set_title(matches[2])
|
place.set_title(matches[2])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user