Fix to write GENDEX to tgz, if necessary

svn: r13255
This commit is contained in:
Doug Blank 2009-09-26 02:05:06 +00:00
parent 4050b4f4f3
commit 8afdabc729

View File

@ -4913,9 +4913,6 @@ class NavWebReport(Report):
IndividualListPage(self, self.title, ind_list) IndividualListPage(self, self.title, ind_list)
if self.inc_gendex:
fp_gendex = self.create_file("gendex", ext=".txt")
for person_handle in ind_list: for person_handle in ind_list:
self.progress.step() self.progress.step()
person = self.database.get_person_from_handle(person_handle) person = self.database.get_person_from_handle(person_handle)
@ -4927,10 +4924,13 @@ class NavWebReport(Report):
attribute_list) attribute_list)
if self.inc_gendex: if self.inc_gendex:
self.progress.set_pass(_('Creating GENDEX file'), len(ind_list))
fp_gendex = self.create_file("gendex", ext=".txt")
for person_handle in ind_list:
self.progress.step()
person = self.database.get_person_from_handle(person_handle)
self.write_gendex(fp_gendex, person) self.write_gendex(fp_gendex, person)
self.close_file(fp_gendex)
if self.inc_gendex:
fp_gendex.close()
def write_gendex(self, fp, person): def write_gendex(self, fp, person):
""" """