Changeset 2495 for WAeUP_SRP/base
- Timestamp:
- 1 Nov 2007, 07:11:20 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r2478 r2495 1407 1407 students_folder = self.portal_url.getPortalObject().campus.students 1408 1408 start = True 1409 tr_count = 11409 tr_count = 0 1410 1410 total_imported = 0 1411 1411 total_not_imported = 0 … … 1477 1477 ds = DataStructure(data=item,datamodel=dm) 1478 1478 error_string = "" 1479 total += 1 1479 1480 for k in import_keys: 1480 1481 if not validators[k](ds,mode=mode): … … 1497 1498 em = format % item 1498 1499 imported.append(em) 1499 logger.info("%(total_imported)d of %(total)d %(em)s" % vars())1500 1500 tr_count += 1 1501 1501 total_imported += 1 1502 total += 1 1502 logger.info("%(total_imported)d of %(total)d %(em)s" % vars()) 1503 1503 1504 if total and not total % 100: 1504 1505 transaction.commit() … … 1521 1522 open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write( 1522 1523 '\n'.join(not_imported)) 1523 em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total) 1524 em = " Finished: %d imported, %d not imported (of total %d)" % (total_imported,total_not_imported,total) 1525 logger.info(em) 1524 1526 return em 1525 1527 ###)
Note: See TracChangeset for help on using the changeset viewer.