~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archivepublisher/scripts/publish_ftpmaster.py

  • Committer: Jeroen Vermeulen
  • Date: 2011-07-18 21:50:38 UTC
  • mto: This revision was merged to the branch mainline in revision 13478.
  • Revision ID: jeroen.vermeulen@canonical.com-20110718215038-w8lm6ufp99826y69
Convert publishdistro to a LaunchpadCronScript.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    ]
10
10
 
11
11
from datetime import datetime
12
 
from optparse import OptionParser
13
12
import os
14
13
from pytz import utc
15
14
from zope.component import getUtility
26
25
from lp.registry.interfaces.series import SeriesStatus
27
26
from lp.services.utils import file_exists
28
27
from lp.soyuz.enums import ArchivePurpose
29
 
from lp.soyuz.scripts import publishdistro
 
28
from lp.soyuz.scripts.publishdistro import PublishDistro
30
29
from lp.soyuz.scripts.ftpmaster import LpQueryDistro
31
30
from lp.soyuz.scripts.processaccepted import ProcessAccepted
32
31
 
363
362
            args +
364
363
            sum([['-s', suite] for suite in suites], []))
365
364
 
366
 
        parser = OptionParser()
367
 
        publishdistro.add_options(parser)
368
 
        options, args = parser.parse_args(arguments)
369
 
        publishdistro.run_publisher(options, self.txn, log=self.logger)
 
365
        publish_distro = PublishDistro(test_args=arguments)
 
366
        publish_distro.logger = self.logger
 
367
        publish_distro.txn = self.txn
 
368
        publish_distro.main()
370
369
 
371
370
    def publishDistroArchive(self, archive, security_suites=None):
372
371
        """Publish the results for an archive.