Ignore:
Timestamp:
29 May 2011, 10:19:58 (14 years ago)
Author:
Henrik Bettermann
Message:

Use the message output of CertificateContainer?.addCertificate in CertificateProcessor?.addEntry and finally in BatchProcessor?.doImport to notify that the import failed. This can maybe merged with CertificateProcessor?.entryExists?!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/batching.py

    r5009 r6219  
    279279                    self.writeFailedRow(
    280280                        failed_writer, raw_row,
    281                         "This object already exists. Skipping.")
     281                        "This object already exists in the same container. Skipping.")
    282282                    continue
    283283                obj = self.callFactory()
     284                #import pdb; pdb.set_trace()
    284285                for key, value in row.items():
    285286                    setattr(obj, key, value)
    286                 self.addEntry(obj, row, site)
     287                if not self.addEntry(obj, row, site):
     288                    num_warns += 1
     289                    self.writeFailedRow(
     290                        failed_writer, raw_row,
     291                        "This object code already exists somewhere else. Skipping.")
     292                    continue
    287293            elif mode == 'remove':
    288294                if not self.entryExists(row, site):
Note: See TracChangeset for help on using the changeset viewer.