Make sure Gedcom ADDR token if location is populated. Bug #2216

svn: r10831
This commit is contained in:
Gary Burton 2008-06-28 11:49:24 +00:00
parent b8abf1dbcf
commit e4354bd9d9

View File

@ -1427,8 +1427,7 @@ class GedcomWriter(BasicUtils.UpdateCallback):
# be written out in the event detail. # be written out in the event detail.
# http://homepages.rootsweb.com/~pmcbride/gedcom/55gcch2.htm#EVENT_DETAIL # http://homepages.rootsweb.com/~pmcbride/gedcom/55gcch2.htm#EVENT_DETAIL
location = place.get_main_location() location = place.get_main_location()
if location: if location and not location.is_empty():
if location.get_street():
self.__writeln(level, "ADDR", location.get_street()) self.__writeln(level, "ADDR", location.get_street())
if location.get_city(): if location.get_city():
self.__writeln(level + 1, 'CITY', location.get_city()) self.__writeln(level + 1, 'CITY', location.get_city())