* 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:
Alex Roitman
2005-05-30 20:41:43 +00:00
parent a766caa5b9
commit 095915429d
16 changed files with 485 additions and 545 deletions

View File

@@ -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)