[ZODB-Dev] transaction as context manager, exception during commit

2011-02-24 Thread Chris Withers
Hi Jim, The current __exit__ for transaction managers looks like this: def __exit__(self, t, v, tb): if v is None: self.commit() else: self.abort() ..which means that if you're using the transaction package as a context manager and, say, a

Re: [ZODB-Dev] transaction as context manager, exception during commit

2011-02-24 Thread Laurence Rowe
On 24 February 2011 10:17, Chris Withers ch...@simplistix.co.uk wrote: Hi Jim, The current __exit__ for transaction managers looks like this:     def __exit__(self, t, v, tb):         if v is None:             self.commit()         else:             self.abort() ..which means that if

Re: [ZODB-Dev] transaction as context manager, exception during commit

2011-02-24 Thread Chris Withers
On 24/02/2011 11:38, Laurence Rowe wrote: Hi Jim, The current __exit__ for transaction managers looks like this: def __exit__(self, t, v, tb): if v is None: self.commit() else: self.abort() ..which means that if you're using the