# HG changeset patch # User Sylvain Thénault # Date 1374768748 -7200 # Node ID 4e1946bd9ea2f52e7f86fe76add525dc59b2861a # Parent eaa58d1c7d5f2aaa9583a82665806aceaf14e85b [session commit] save back exception context to avoid potentiel cluttering if some revert operation raise an exception diff -r eaa58d1c7d5f -r 4e1946bd9ea2 server/session.py --- a/server/session.py Mon Jul 29 14:22:40 2013 +0200 +++ b/server/session.py Thu Jul 25 18:12:28 2013 +0200 @@ -1259,6 +1259,9 @@ self.pending_operations[:] = processed self.debug('precommit session %s done', self.id) except BaseException: + # save exception context, it may be clutered below by + # exception in revert_* event + exc_info = sys.exc_info() # if error on [pre]commit: # # * set .failed = True on the operation causing the failure @@ -1284,7 +1287,7 @@ # read-only property. self.pending_operations[:] = processed + self.pending_operations self.rollback(free_cnxset) - raise + raise exc_info[0], exc_info[1], exc_info[2] self.cnxset.commit() self.commit_state = 'postcommit' if debug: