Changeset 2981
- Timestamp:
- 6 Jan 2008, 16:05:43 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_utilities/ti_441_resolve_part2.py
r2980 r2981 25 25 import logging 26 26 import DateTime 27 logger = logging.getLogger('Skins. fix_lgas')27 logger = logging.getLogger('Skins.ti_441_resolve_part2') 28 28 from Products.AdvancedQuery import Eq, Between, Le,In 29 29 aq_portal = context.portal_catalog_real.evalAdvancedQuery … … 71 71 d = {} 72 72 for student_record in student_records: 73 # skip record without lga value 73 74 if not student_record.lga: 74 75 continue 76 #skip records with correct lga key value 75 77 if student_record.lga.find('_') > -1: 76 78 continue … … 79 81 continue 80 82 #rwrite("%s: %s" % (student_record.id,student_record.lga)) 81 sl = student_record.lga.split(' /')83 sl = student_record.lga.split(' / ') 82 84 if len(sl) != 2: 83 85 logger.info("found invalid lga %s of %s" % (student_record.lga,student_record.id)) … … 91 93 count += 1 92 94 if len(d) and not len(d) % commit_after: 93 logger.info("found %d correct of %d so far" % (len(d),count))95 logger.info("found %d correct state/lga combinations of %d so far" % (len(d),count)) 94 96 state_lga = state + '_' + lga 95 97 if state in states: … … 115 117 # break 116 118 to_edit = len(d) 117 logger.info("found %d correct lgas of %d" % (to_edit,count))118 #return119 logger.info("found %d correct state/lga combinations of %d" % (to_edit,count)) 120 return 119 121 120 122 edited = 1
Note: See TracChangeset for help on using the changeset viewer.