~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/mail/handler.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-19 23:43:35 UTC
  • mfrom: (13970.10.13 ztm-murder)
  • Revision ID: launchpad@pqm.canonical.com-20110919234335-wl2iifzeioub5uhc
[r=sinzui][no-qa] Stripped of its transaction management
 functionality,
 ZopelessTransactionManager is demoted to a mere database configuration
 manager.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
from lazr.lifecycle.event import ObjectCreatedEvent
15
15
from lazr.lifecycle.interfaces import IObjectCreatedEvent
 
16
import transaction
16
17
from zope.component import getUtility
17
18
from zope.event import notify
18
19
from zope.interface import implements
19
20
 
20
 
from canonical.database.sqlbase import rollback
21
21
from canonical.launchpad.helpers import get_email_template
22
22
from canonical.launchpad.mailnotification import (
23
23
    MailWrapper,
300
300
                    processing_errors.append((error, command))
301
301
                    if error.stop_processing:
302
302
                        commands = []
303
 
                        rollback()
 
303
                        transaction.abort()
304
304
                    else:
305
305
                        continue
306
306
 
431
431
                notify(bugtask_event)
432
432
 
433
433
    def handleNoAffectsTarget(self):
434
 
        rollback()
 
434
        transaction.abort()
435
435
        raise IncomingEmailError(
436
436
            get_error_message(
437
437
                'no-affects-target-on-submit.txt',