Comment 3 for bug 806163

Revision history for this message
dobey (dobey) wrote :

This is probably the most relevant block of code, as it is where the failure occurs. person is the result of launchpad.people.getByEmail(), and team is a result of launchpad.people[teamname].

    def __is_in_team(self, person, team):
        """Check that a person is a member of team, or one of its subteams."""
        for subteam in team.members:
            if subteam == person:
                return True
            if subteam.is_team and self.__is_in_team(person, subteam):
                return True
        return False