~fginther/jenkins-launchpad-plugin/indirect-team-membership

« back to all changes in this revision

Viewing changes to jlp/launchpadutils.py

  • Committer: Aaron Bentley
  • Date: 2013-10-09 19:07:45 UTC
  • Revision ID: aaron@canonical.com-20131009190745-8dslbc59rbs8f0k9
Update docs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
 
204
204
 
205
205
def users_in_team(users, team):
 
206
    """Determine whether any of these users are in the supplied team.
 
207
 
 
208
    :param users: The users which may be members of the supplied team.
 
209
    :param team: The team which users may be part of.
 
210
    :return: True if any of the users are members of the team, otherwise
 
211
        False.
 
212
    """
206
213
    for member in team.participants:
207
214
        if member in users:
208
215
            return True