Ignore:
Timestamp:
5 Jan 2008, 15:01:33 (17 years ago)
Author:
Henrik Bettermann
Message:

fix fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_utilities/fix_lgas.py

    r2978 r2979  
    6666logger.info("found %d students" % total)
    6767count = 0
    68 commit_after = 50
    69 logger.info('started to fix %d lga' % total)
     68commit_after = 100
     69logger.info('started to fix %d records in students_catalog' % total)
    7070d,states,lgas = getLGAs()
    7171d = {}
     
    7676        continue
    7777    if student_record.lga.startswith('no state'):
     78        logger.info("found invalid lga %s of %s" % (student_record.lga,student_record.id))
    7879        continue
    7980    #rwrite("%s: %s" % (student_record.id,student_record.lga))
    8081    sl = student_record.lga.split('/')
    8182    if len(sl) != 2:
     83        logger.info("found invalid lga %s of %s" % (student_record.lga,student_record.id))
    8284        #rwrite("wrong size %s: %s" % (student_record.id,sl))
    8385        continue
     
    8587    lga = sl[1].lower().strip()
    8688    if not lga or not state:
     89        logger.info("found invalid lga %s of %s" % (student_record.lga,student_record.id))
    8790        continue
    8891    count += 1
    8992    if len(d) and not len(d)  % commit_after:
    90         logger.info("found %d correct of  %d sofar" % (len(d),count))
     93        logger.info("found %d correct of %d so far" % (len(d),count))
    9194    state_lga = state + '_' + lga
    9295    if state in states:
     
    101104            break
    102105        if found:
    103             msg = "found %s for %s" % (state_lga,student_record.id)
     106            #msg = "found %s for %s" % (state_lga,student_record.id)
    104107            d[student_record.id] = state_lga
    105         else:
    106             msg = "no '%s' '%s' for %s" % (state,lga,student_record.id)
     108        #else:
     109            #msg = "no '%s' '%s' for %s" % (state,lga,student_record.id)
    107110            #rwrite(msg)
    108     else:
    109         msg = "no state '%s' '%s' for %s" % (state,lga,student_record.id)
     111    #else:
     112        #msg = "no state '%s' '%s' for %s" % (state,lga,student_record.id)
    110113        #rwrite(msg)
    111114    # if count > 150:
Note: See TracChangeset for help on using the changeset viewer.