~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/scripts/publishdistro.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-09 10:30:43 UTC
  • mfrom: (13607.3.4 bug-820796)
  • Revision ID: launchpad@pqm.canonical.com-20110809103043-865kaypngiquws1f
[r=henninge][bug=820796] Make publisher scripts use the same lock
        file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
    ]
9
9
 
10
10
from optparse import OptionValueError
 
11
 
11
12
from zope.component import getUtility
12
13
 
13
14
from lp.app.errors import NotFoundError
14
 
from lp.archivepublisher.publishing import getPublisher
 
15
from lp.archivepublisher.publishing import (
 
16
    getPublisher,
 
17
    GLOBAL_PUBLISHER_LOCK,
 
18
    )
15
19
from lp.registry.interfaces.distribution import IDistributionSet
16
20
from lp.services.scripts.base import (
17
21
    LaunchpadCronScript,
40
44
class PublishDistro(LaunchpadCronScript):
41
45
    """Distro publisher."""
42
46
 
 
47
    lockfilename = GLOBAL_PUBLISHER_LOCK
 
48
 
43
49
    def add_my_options(self):
44
50
        self.parser.add_option(
45
51
            "-C", "--careful", action="store_true", dest="careful",