From 915522c989905f513f7dde0f209d3a954817d99d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 19 Mar 2015 16:12:01 +0100 Subject: [PATCH] 8451: Fix crash on RelGraph report with unknown gender --- src/plugins/rel/rel_fr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/rel/rel_fr.py b/src/plugins/rel/rel_fr.py index 6114d142f..8845f91af 100644 --- a/src/plugins/rel/rel_fr.py +++ b/src/plugins/rel/rel_fr.py @@ -334,7 +334,7 @@ def get_child_unknown(level, inlaw=""): else: return u"un descendant lointain%s" % inlaw -def get_sibling_unknown(inlaw=""): +def get_sibling_unknown(Ga, inlaw=""): """ sibling of an ancestor, gender = unknown """ @@ -654,7 +654,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator): elif gender_b == gen.lib.Person.FEMALE: rel_str = u"la tante lointaine" + bygen % (Ga + 1) elif gender_b == gen.lib.Person.UNKNOWN: - rel_str = get_sibling_unknown(inlaw) + rel_str = get_sibling_unknown(Ga, inlaw) else: return rel_str elif Ga == 1: @@ -673,7 +673,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator): rel_str = u"la nièce lointaine%s (%dème génération)" % \ (inlaw, Gb) elif gender_b == gen.lib.Person.UNKNOWN: - rel_str = get_sibling_unknown(inlaw) + rel_str = get_sibling_unknown(Ga, inlaw) else: return rel_str elif Ga == Gb: @@ -685,7 +685,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator): elif gender_b == gen.lib.Person.FEMALE: rel_str = get_cousine(Ga - 1, 0, inlaw=inlaw) elif gender_b == gen.lib.Person.UNKNOWN: - rel_str = get_sibling_unknown(inlaw) + rel_str = get_sibling_unknown(Ga, inlaw) else: return rel_str elif Ga > 1 and Ga > Gb: