Changeset 3425 for WAeUP_SRP/uniben


Ignore:
Timestamp:
7 Apr 2008, 07:24:40 (17 years ago)
Author:
Henrik Bettermann
Message:

fix traceback

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/uniben/waeup_custom/getAccommodationInfo.py

    r3131 r3425  
    8585new = student_record.entry_session == session[0]
    8686arrived = student_record.session == session[0]
    87 previous = int(student_record.session) == int(session[0]) - 1
     87
    8888level = None
    8989end_level = None
    9090try:
    9191    level = int(student_record.level)
    92 except ValueError:
    93     logger.info('%s has invalid level %s' % (member_id,student_record.level))
     92except:
     93    logger.info('%s has invalid level %s' % (student_id,student_record.level))
    9494try:
    9595    end_level = int(student_record.end_level)
    96 except ValueError:
    97     logger.info('%s has invalid end_level %s' % (member_id,student_record.end_level))
    98    
     96except:
     97    logger.info('%s has invalid end_level %s' % (student_id,student_record.end_level))
     98try:
     99    previous = int(student_record.session) == int(session[0]) - 1   
     100except:
     101    logger.info('%s has invalid session %s' % (student_id,student_record.session))
     102
    99103if level is None or end_level is None or student_record.review_state == 'deactivated':
    100104    pass
Note: See TracChangeset for help on using the changeset viewer.