~launchpad-pqm/launchpad/devel

10637.3.1 by Guilherme Salgado
Use the default python version instead of a hard-coded version
1
#!/usr/bin/python -S
8687.15.22 by Karl Fogel
Add the copyright header block to the remaining .py 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
7240.1.1 by Muharem Hrnjadovic
all tests pass
6
# pylint: disable-msg=W0403
7240.1.2 by Muharem Hrnjadovic
enhanced doc strings
7
"""Create a copy archive and populate it with packages.
8
9
    Please note: the destination copy archive must not exist yet. Otherwise
10
    the script will abort with an error.
7240.1.1 by Muharem Hrnjadovic
all tests pass
11
"""
12
13
import _pythonpath
14
14605.1.1 by Curtis Hovey
Moved canonical.config to lp.services.
15
from lp.services.config import config
8426.3.8 by Celso Providelo
cleanup populate-archive.py top-level script.
16
from lp.soyuz.scripts.populate_archive import ArchivePopulator
7240.1.1 by Muharem Hrnjadovic
all tests pass
17
8426.3.12 by Celso Providelo
lint issues.
18
7240.1.1 by Muharem Hrnjadovic
all tests pass
19
if __name__ == '__main__':
20
    script = ArchivePopulator(
7344.1.4 by Muharem Hrnjadovic
fixed script database user
21
        'populate-archive', dbuser=config.archivepublisher.dbuser)
8426.3.8 by Celso Providelo
cleanup populate-archive.py top-level script.
22
    script.lock_and_run()