Pelletier Vincent wrote at 2008-2-8 10:56 +0100:
>I triggered a bad behaviour in Zope 2.8 Transaction class:
>  <do something>
>  <commit> <- raises conflict error from ZODB's tpc_vote
>  <cleanup>

Where does this "cleanup" code comes from -- from your application?
>  raise

"try: ... except: ..." are extremely dangerous -- never use them.

If you think you need something like this, always use

   try: ...
   except ConflictError: raise
   except: ....

> ...
>Note that before raising, Transaction.register did
>  adapter.objects.append(obj)

In my Zope 2.8.1, this does not happen -- probably a bug that
has been introduced later.

I would check whether the problematic code is still in the
current Zope version. If so, I would file a bug report.
Otherwise, you may consider an upgrade or a local fix.

Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to