[ZODB-Dev] ConflictError?

Chris Withers chrisw@nipltd.com
Thu, 26 Jul 2001 20:30:08 +0100


Chris McDonough wrote:
> 
> Do the same thing as Zope does.  Try it again.  ;-)

Ah, OK..

..that raises a python question:

Is it okay to do something like the following:

for x in y:

  get_transaction().begin()
  ...do stuff with x...
  try:
    get_transaction().commit()
  except ConflictError:
    y.append(x)

cheers,

Chris