Changeset 504778e for asadb/util


Ignore:
Timestamp:
May 21, 2011, 8:35:03 PM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage, test-hooks
Children:
14e96b3
Parents:
35d8e68
git-author:
Alex Dehnert <adehnert@…> (05/20/11 18:46:58)
git-committer:
Alex Dehnert <adehnert@…> (05/21/11 20:35:03)
Message:

Make import script run without intervention

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/util/import_db.py

    r1753602 r504778e  
    6060        g.group_email       = canonicalize_email(d['STUDENT_GROUP_EMAIL'])
    6161        g.officer_email     = canonicalize_email(d['OFFICER_EMAIL'])
    62         g.main_account_id   = convert_to_int(d['MAIN_ACCOUNT_ID'])
     62        try:
     63            g.main_account_id   = convert_to_int(d['MAIN_ACCOUNT_ID'])
     64        except ValueError:
     65            if d['MAIN_ACCOUNT_ID'] == "contact LWard":
     66                print "Ignoring account ID contact LWard..."
     67                g.main_account_id = None
     68            else:
     69                raise
    6370        g.funding_account_id= convert_to_int(d['FUNDING_ACCOUNT_ID'])
    6471        g.athena_locker     = d['ATHENA_LOCKER']
Note: See TracChangeset for help on using the changeset viewer.