KeyboardInterrupt not handled properly in transaction aborting
|Reported by:||mtredinnick||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
After  transaction.commit_on_success does not handle KeyboardInterrupt.
Problem in django.db.transaction.Transaction.__exit__ and default exiting function.
def __exit__(self, exc_type, exc_value, traceback): self.exiting(exc_value, self.using)
exc_value is None after KeyboardInterrupt has been throwed, only exc_type and traceback has value.
But if raise KeyboardInterrupt manualy from code it's work ok.
Possible solution: use exc_type and exc_value in exiting function
I use python 2.6.6
Change History (7)
comment:1 Changed 3 years ago by aaugustin
- Resolution set to needsinfo
- Status changed from new to closed
comment:4 Changed 2 years ago by claudep
- Resolution needsinfo deleted
- Status changed from closed to reopened
- Triage Stage changed from Unreviewed to Accepted