Changeset 2495 for WAeUP_SRP/base


Ignore:
Timestamp:
1 Nov 2007, 07:11:20 (17 years ago)
Author:
Henrik Bettermann
Message:

fix for #313 and #386

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2478 r2495  
    14071407        students_folder = self.portal_url.getPortalObject().campus.students
    14081408        start = True
    1409         tr_count = 1
     1409        tr_count = 0
    14101410        total_imported = 0
    14111411        total_not_imported = 0
     
    14771477            ds = DataStructure(data=item,datamodel=dm)
    14781478            error_string = ""
     1479            total += 1
    14791480            for k in import_keys:
    14801481                if not validators[k](ds,mode=mode):
     
    14971498                em = format % item
    14981499                imported.append(em)
    1499                 logger.info("%(total_imported)d of %(total)d %(em)s" % vars())
    15001500                tr_count += 1
    15011501                total_imported += 1
    1502             total += 1
     1502                logger.info("%(total_imported)d of %(total)d %(em)s" % vars())
     1503           
    15031504            if total and not total % 100:
    15041505                transaction.commit()
     
    15211522            open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(
    15221523                                                '\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)
    15241526        return em
    15251527    ###)
Note: See TracChangeset for help on using the changeset viewer.