~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/list-team-members

  • Committer: Gary Poster
  • Date: 2009-12-07 19:42:12 UTC
  • mto: This revision was merged to the branch mainline in revision 9988.
  • Revision ID: gary.poster@canonical.com-20091207194212-tf3q40sa8qptd13z
clean up further based on review feedback

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        if not teamnames:
45
45
            self.parser.error('No team specified')
46
46
 
47
 
        member_details = []
 
47
        # We don't want duplicates, so use a set to enforce uniqueness.
 
48
        member_details = set()
48
49
        for teamname in teamnames:
49
50
            try:
50
 
                member_details.extend(process_team(teamname, display_option))
 
51
                member_details.update(process_team(teamname, display_option))
51
52
            except NoSuchTeamError:
52
53
                print "Error, no such team: %s" % teamname
53
54
                return 1
54
 
        # We don't want duplicates, so use "set" get unique only
55
55
        print "\n".join(detail.encode('utf-8') for detail in
56
 
                        sorted(list(set(member_details))))
 
56
                        sorted(member_details))
57
57
        return 0
58
58
 
59
59
if __name__ == '__main__':