#6928: commit_on_success: Handle KeyboardInterrupt -------------------------------------+------------------------------------- Reporter: guettli | Owner: nobody Type: | Status: reopened Uncategorized | Component: Database layer Milestone: | (models, ORM) Version: SVN | Severity: Normal Resolution: | Keywords: Triage Stage: Ready for | Has patch: 1 checkin | Needs tests: 0 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by nmk):
* status: closed => reopened * severity: => Normal * type: => Uncategorized * easy: => 0 * ui_ux: => 0 * resolution: fixed => Comment: after [14288] transaction.commit_on_success does not handle `KeyboardInterrupt`. Problem in `django.db.transaction.Transaction.__exit__` and default `exiting` function. {{{#!python def __exit__(self, exc_type, exc_value, traceback): self.exiting(exc_value, self.using) }}} `exc_value` is None after `KeybordInterrupt` has been throwed, only `exc_type` and `traceback` has value. But if raise `KeybordInterrupt` manualy from code it's work ok. Possible solution: use `exc_type` and `exc_value` in `exiting` function I use python 2.6.6 -- Ticket URL: <https://code.djangoproject.com/ticket/6928#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.