* src/RelLib.py: Move constants back to RelLib, as class attributes.
* src/Utils.py: Move constant mappings from const.py.in * src/const.py.in: Move constants and mappings elsewhere. * various: Use constants from RelLib, not const. svn: r4736
This commit is contained in:
@@ -322,22 +322,22 @@ class RelationshipCalculator:
|
||||
if firstRel == 0:
|
||||
if secondRel == 0:
|
||||
return ('',common)
|
||||
elif other_person.get_gender() == const.MALE:
|
||||
elif other_person.get_gender() == RelLib.Person.MALE:
|
||||
return (self.get_father(secondRel),common)
|
||||
else:
|
||||
return (self.get_mother(secondRel),common)
|
||||
elif secondRel == 0:
|
||||
if other_person.get_gender() == const.MALE:
|
||||
if other_person.get_gender() == RelLib.Person.MALE:
|
||||
return (self.get_son(firstRel),common)
|
||||
else:
|
||||
return (self.get_daughter(firstRel),common)
|
||||
elif firstRel == 1:
|
||||
if other_person.get_gender() == const.MALE:
|
||||
if other_person.get_gender() == RelLib.Person.MALE:
|
||||
return (self.get_uncle(secondRel),common)
|
||||
else:
|
||||
return (self.get_aunt(secondRel),common)
|
||||
elif secondRel == 1:
|
||||
if other_person.get_gender() == const.MALE:
|
||||
if other_person.get_gender() == RelLib.Person.MALE:
|
||||
return (self.get_nephew(firstRel-1),common)
|
||||
else:
|
||||
return (self.get_niece(firstRel-1),common)
|
||||
|
||||
Reference in New Issue
Block a user