#16682: KeyboardInterrupt not handled properly in transaction aborting -------------------------------------+------------------------------------- Reporter: | Owner: nobody mtredinnick | Status: closed Type: Bug | Component: Database layer Milestone: | (models, ORM) Version: 1.3 | Severity: Normal Resolution: needsinfo | Keywords: Triage Stage: | Has patch: 0 Unreviewed | Needs tests: 0 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by aaugustin):
* status: new => closed * resolution: => needsinfo Comment: I'm sorry, but this report doesn't contain enough information to reproduce the problem. How can you get a `KeyboardInterrupt` within `transaction.commit_on_success`? I wrote this test code: {{{ # models.py from django.db import models class FooModel(models.Model): foo = models.CharField(max_length=42) # views.py import time from django.db import transaction from .models import FooModel @transaction.commit_on_success def interrupt_me(request): FooModel.objects.create(foo='foo') print "Hit Ctrl-C now!" time.sleep(5) print "Too late, and I didn't bother to return a HttpResponse" }}} and hooked the view in the URLconf. Then I ran: `./manage.py runserver --traceback` I open the URL in a browser, and during the sleep, I hit Ctrl-C in the console. `runserver` exits cleanly, with or without `transaction.commit_on_success`. Please provide a test case or instructions to reproduce your problem and re-open the ticket. -- Ticket URL: <https://code.djangoproject.com/ticket/16682#comment:1> 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.