Ignore:
Timestamp:
18 Oct 2014, 20:48:01 (10 years ago)
Author:
Henrik Bettermann
Message:

Catch ConstraintNotSatisfied? error (not yet tested).

File:
1 edited

Legend:

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

    r11737 r11849  
    3535from zope.interface import Interface, implementer
    3636from zope.schema import getFields
     37from zope.schema.interfaces import ConstraintNotSatisfied
    3738from zope.event import notify
    3839from waeup.kofa.async import AsyncJob
     
    376377                        failed_writer, string_row, update_errors)
    377378                    continue
    378                 self.updateEntry(obj, row, site, base)
     379                try:
     380                    self.updateEntry(obj, row, site, base)
     381                except ConstraintNotSatisfied, err:
     382                    num_warns += 1
     383                    self.writeFailedRow(
     384                        failed_writer, string_row,
     385                        "ConstraintNotSatisfied: %s" % err)
     386                    continue
    379387            finished_writer.writerow(string_row)
    380388
Note: See TracChangeset for help on using the changeset viewer.