Merge remote-tracking branch 'upstream/master' into test_imports

This commit is contained in:
prculley 2016-05-24 14:44:08 -05:00
commit 7646d41774
5 changed files with 22 additions and 5 deletions

View File

@ -207,12 +207,23 @@ class BaseTest(unittest.TestCase):
"""
Test IsEnclosedBy rule.
"""
rule = IsEnclosedBy(['P0001'])
rule = IsEnclosedBy(['P0001', '0'])
self.assertEqual(self.filter_with_rule(rule), set([
b'EAFKQCR0ED5QWL87EO', b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2',
b'V6ALQCZZFN996CO4D', b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6',
b'PTFKQCKPHO2VC5SYKS', b'PHUJQCJ9R4XQO5Y0WS']))
def test_isenclosedby_inclusive(self):
"""
Test IsEnclosedBy rule with inclusive option.
"""
rule = IsEnclosedBy(['P0001', '1'])
self.assertEqual(self.filter_with_rule(rule), set([
b'c96587262e91149933fcea5f20a', b'EAFKQCR0ED5QWL87EO',
b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2', b'V6ALQCZZFN996CO4D',
b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6', b'PTFKQCKPHO2VC5SYKS',
b'PHUJQCJ9R4XQO5Y0WS']))
if __name__ == "__main__":
unittest.main()

View File

@ -88,7 +88,7 @@ def importData(database, filename, user):
except IOError:
return
if not gramps and ansel:
if not gramps and ansel and user.uistate:
top = Glade()
code = top.get_object('codeset')
code.set_active(0)

View File

@ -4344,6 +4344,8 @@ class GedcomParser(UpdateCallback):
attr.set_type(AttributeType.NICKNAME)
attr.set_value(line.data)
state.person.add_attribute(attr)
elif name_len == 0:
return
else:
name = Name()
surname = Surname()

View File

@ -198,7 +198,11 @@ class DetDescendantReport(Report):
def apply_henry_filter(self,person_handle, index, pid, cur_gen=1):
if (not person_handle) or (cur_gen > self.max_generations):
return
self.dnumber[person_handle] = pid
if person_handle in self.dnumber:
if self.dnumber[person_handle] > pid:
self.dnumber[person_handle] = pid
else:
self.dnumber[person_handle] = pid
self.map[index] = person_handle
if len(self.gen_keys) < cur_gen:

View File

@ -180,8 +180,8 @@ def build_man(build_cmd):
filename = False
lang = man_dir[8:]
src = build_cmd.build_base + '/data/man/' + lang + '/gramps.1.gz'
target = 'share/man/' + lang + '/man1'
src = build_cmd.build_base + '/data/man' + lang + '/gramps.1.gz'
target = 'share/man' + lang + '/man1'
data_files.append((target, [src]))
def build_intl(build_cmd):