10637.3.1
by Guilherme Salgado
Use the default python version instead of a hard-coded version |
1 |
#!/usr/bin/python -S
|
8687.15.7
by Karl Fogel
Add the copyright header block to more files. |
2 |
#
|
3 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
|
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
5 |
||
4935.3.7
by Curtis Hovey
Added bad name suppression to cronscripts. |
6 |
# pylint: disable-msg=C0103,W0403
|
3691.84.7
by James Henstridge
rename files |
7 |
"""Upstream Product Release Finder.
|
1976
by Canonical.com Patch Queue Manager
dyson product release creator [r=dsilvers] |
8 |
|
9 |
Scan FTP and HTTP sites specified for each ProductSeries in the database
|
|
10 |
to identify files and create new ProductRelease records for them.
|
|
11 |
"""
|
|
12 |
||
3691.7.2
by Stuart Bishop
Make dyson set path correctly |
13 |
import _pythonpath |
3691.105.4
by James Henstridge
update product-release-finder.py to use modularised version of code |
14 |
|
14612.2.8
by William Grant
cronscripts |
15 |
from lp.registry.scripts.productreleasefinder.finder import ( |
16 |
ProductReleaseFinder, |
|
17 |
)
|
|
14605.1.1
by Curtis Hovey
Moved canonical.config to lp.services. |
18 |
from lp.services.config import config |
8356.1.1
by Leonard Richardson
Partial move. |
19 |
from lp.services.scripts.base import LaunchpadCronScript |
3691.105.4
by James Henstridge
update product-release-finder.py to use modularised version of code |
20 |
|
21 |
||
4264.2.1
by James Henstridge
add a LaunchpadCronScript subclass, and make cronscripts/*.py use it |
22 |
class ReleaseFinderScript(LaunchpadCronScript): |
3691.348.18
by kiko
Convert most other scripts; 6 remain, of which one looks like it's going to be a bit tricky... |
23 |
def main(self): |
24 |
prf = ProductReleaseFinder(self.txn, self.logger) |
|
25 |
prf.findReleases() |
|
1976
by Canonical.com Patch Queue Manager
dyson product release creator [r=dsilvers] |
26 |
|
27 |
if __name__ == "__main__": |
|
3691.348.18
by kiko
Convert most other scripts; 6 remain, of which one looks like it's going to be a bit tricky... |
28 |
script = ReleaseFinderScript('productreleasefinder', |
29 |
dbuser=config.productreleasefinder.dbuser) |
|
30 |
script.lock_and_run() |
|
31 |