~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/model/potemplate.py

  • Committer: Curtis Hovey
  • Date: 2011-12-23 17:18:11 UTC
  • mto: This revision was merged to the branch mainline in revision 14599.
  • Revision ID: curtis.hovey@canonical.com-20111223171811-0pl78hw2noohfy4r
Dismantled doctest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    SQLBase,
62
62
    sqlvalues,
63
63
    )
64
 
from canonical.launchpad.helpers import shortlist
65
 
from lp.services.mail.helpers import get_email_template
 
64
from canonical.launchpad import helpers
66
65
from lp.services.database.lpstorm import (
67
66
    IMasterStore,
68
67
    IStore,
1014
1013
                            "Statistics update failed: %s" % unicode(error))
1015
1014
 
1016
1015
        if template_mail is not None:
1017
 
            template = get_email_template(
 
1016
            template = helpers.get_email_template(
1018
1017
                template_mail, 'translations')
1019
1018
            message = template % replacements
1020
1019
            return (subject, message)
1337
1336
                conditions, POTemplate.distroseries == distroseries)
1338
1337
 
1339
1338
        store = IStore(POTemplate)
1340
 
        matches = shortlist(store.find(POTemplate, conditions))
 
1339
        matches = helpers.shortlist(store.find(POTemplate, conditions))
1341
1340
 
1342
1341
        if len(matches) == 0:
1343
1342
            # Nope.  Sorry.