Changeset 0dc771d


Ignore:
Timestamp:
Mar 14, 2012, 3:35:28 PM (14 years ago)
Author:
ASA Group Database <asa-db@…>
Branches:
master, space-access, stable, stage
Children:
72a3d90
Parents:
18cc51c
git-author:
Alex Dehnert <adehnert@…> (03/14/12 15:35:28)
git-committer:
ASA Group Database <asa-db@…> (03/14/12 15:35:28)
Message:

Misc improvements to find_missing_transition.py

  • Check for a missing president, in case anybody accidentally punted theirs
  • Don't error on groups not in the CSV dump
  • Print a sample email at the end
File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/find_missing_transition.py

    r2a587e4 r0dc771d  
    1818def get_roles():
    1919    roles = [
     20        ['president', True, 'No president listed', ],
    2021        ['treasurer', True, 'No treasurer listed', ],
    2122        ['financial', False, 'No financial signatories listed. At minimum, this should generally be your president and treasurer.', ],
     
    6263        fail, problems = check_group(group, roles, )
    6364        if fail:
    64             to = [officers[group.pk]]
     65            try:
     66                to = [officers[group.pk]]
     67            except KeyError:
     68                print "Group %s not found in CSV" % (group, )
    6569            if group.officer_email:
    6670                to.append(group.officer_email)
     
    8185    connection = mail.get_connection()
    8286    #connection.send_messages(emails)
    83     for email in emails: print email.subject
     87    for email in emails:
     88        print email.subject
     89    print email.body
    8490    print len(emails)
    8591
Note: See TracChangeset for help on using the changeset viewer.