~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/mlist-sync.py

Refacortings per review.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
from canonical.config import config
37
37
from canonical.launchpad.interfaces import (
38
38
    IEmailAddressSet, IMailingListSet, IPersonSet)
39
 
from canonical.launchpad.mailman.config import prefix
 
39
from canonical.launchpad.mailman.config import configure_prefix
40
40
from canonical.launchpad.scripts.base import LaunchpadCronScript
41
41
 
42
42
 
182
182
    def deleteMailmanList(self, list_name):
183
183
        """Delete all Mailman data structures for `list_name`."""
184
184
        mailman_bindir = os.path.normpath(os.path.join(
185
 
            prefix(config.mailman.build_prefix), 'bin'))
 
185
            configure_prefix(config.mailman.build_prefix), 'bin'))
186
186
        process = subprocess.Popen(('./rmlist', '-a', list_name),
187
187
                                   stdout=subprocess.PIPE,
188
188
                                   stderr=subprocess.PIPE,
208
208
 
209
209
        # We need to get to the Mailman API.  Set up the paths so that Mailman
210
210
        # can be imported.  This can't be done at module global scope.
211
 
        mailman_path = prefix(config.mailman.build_prefix)
 
211
        mailman_path = configure_prefix(config.mailman.build_prefix)
212
212
        sys.path.append(mailman_path)
213
213
 
214
214
        retcode = self.syncMailmanDirectories(source_url)