~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/scripts/base.py

  • Committer: William Grant
  • Date: 2011-09-18 07:15:22 UTC
  • mto: (13970.10.9 ztm-murder)
  • mto: This revision was merged to the branch mainline in revision 13983.
  • Revision ID: william.grant@canonical.com-20110918071522-8fec9ax61q39bfql
Fix all canonical.lp.initZopeless callsites to use ZTM.initZopeless directly instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
from zope.component import getUtility
34
34
 
35
35
from canonical.config import config
36
 
from canonical.database.sqlbase import ISOLATION_LEVEL_DEFAULT
 
36
from canonical.database.sqlbase import (
 
37
    ISOLATION_LEVEL_DEFAULT,
 
38
    ZopelessTransactionManager,
 
39
    )
37
40
from canonical.launchpad import scripts
38
41
from canonical.launchpad.scripts.logger import OopsHandler
39
42
from canonical.launchpad.webapp.errorlog import globalErrorUtility
41
44
    ANONYMOUS,
42
45
    setupInteractionByEmail,
43
46
    )
44
 
from canonical.lp import initZopeless
45
47
from lp.services.features import (
46
48
    get_relevant_feature_controller,
47
49
    install_feature_controller,
352
354
 
353
355
        Can be overriden for testing purpose.
354
356
        """
355
 
        self.txn = initZopeless(dbuser=self.dbuser, isolation=isolation)
 
357
        self.txn = ZopelessTransactionManager.initZopeless(
 
358
            dbuser=self.dbuser, isolation=isolation)
356
359
 
357
360
    def record_activity(self, date_started, date_completed):
358
361
        """Hook to record script activity."""