~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/mailman/runmailman.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-09 09:23:38 UTC
  • mfrom: (14333.2.13 history-model)
  • Revision ID: launchpad@pqm.canonical.com-20111209092338-se7u5l0skqzaes1v
[r=jcsackett][bug=295214, 894836,
 898200] Keep sort button ob bug listing pages in sync with the
 displayed data

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
import subprocess
17
17
import sys
18
18
 
19
 
import lp.services.config
 
19
import canonical
20
20
from lp.services.mailman.config import configure_prefix
21
21
from lp.services.mailman.monkeypatches import monkey_patch
22
22
 
27
27
    :param command: the command to use.
28
28
    :param quiet: when this is true, no output will happen unless, an error
29
29
        happens.
30
 
    :param config: The LaunchpadConfig object to take configuration from.
 
30
    :param config: The CanonicalConfig object to take configuration from.
31
31
        Defaults to the global one.
32
32
    :param additional_arguments: additional command arguments to pass to the
33
33
        mailmanctl program.
34
34
    :raises RuntimeError: when quiet is True and the command failed.
35
35
    """
36
36
    if config is None:
37
 
        config = lp.services.config.config
 
37
        config = canonical.config.config
38
38
    mailman_path = configure_prefix(config.mailman.build_prefix)
39
39
    mailman_bin = os.path.join(mailman_path, 'bin')
40
40
    args = ['./mailmanctl']
67
67
    # master watcher, and probably one of its queue runners, did not die.
68
68
    # Kill it hard and clean up after it.
69
69
    if config is None:
70
 
        config = lp.services.config.config
 
70
        config = canonical.config.config
71
71
    mailman_path = configure_prefix(config.mailman.build_prefix)
72
72
    master_pid_path = os.path.join(mailman_path, 'data', 'master-qrunner.pid')
73
73
    try:
108
108
 
109
109
    :param quiet: when this is true, no output will happen unless, an error
110
110
        happens.
111
 
    :param config: The LaunchpadConfig object to take configuration from.
 
111
    :param config: The CanonicalConfig object to take configuration from.
112
112
        Defaults to the global one.
113
113
    :raises RuntimeException: when Mailman fails to start successfully.
114
114
    """
115
115
    if config is None:
116
 
        config = lp.services.config.config
 
116
        config = canonical.config.config
117
117
    # We need the Mailman bin directory so we can run some of Mailman's
118
118
    # command line scripts.
119
119
    mailman_path = configure_prefix(config.mailman.build_prefix)