442 def __exit__(self, type, value, traceback):
443 self._assert_is_open("Cannot end transaction context. The transaction "
444 "was closed from within the context")
445 if self.session.transaction is None:
446 return
447 if type is None:
448 try:
449 self.commit()
450 except:
451 self.rollback()
452 raise
453 else:
454 self.rollback()
Bug is likely triggered by this code in SQL Alchemy:
This seems as related to eventlet/tpool etc issues, here with SQLAlchemy. /bitbucket. org/eventlet/ eventlet/ issue/118/ exceptions- are-cleared- during
For example like https:/
pattern is seen here orm/session. py
sqlalchemy/
442 def __exit__(self, type, value, traceback): is_open( "Cannot end transaction context. The transaction " transaction is None:
443 self._assert_
444 "was closed from within the context")
445 if self.session.
446 return
447 if type is None:
448 try:
449 self.commit()
450 except:
451 self.rollback()
452 raise
453 else:
454 self.rollback()