|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: init.py,v 1.35 2004-11-24 07:03:47 a1s Exp $ |
| 18 | +# $Id: init.py,v 1.36 2005-12-03 11:22:50 a1s Exp $ |
19 | 19 |
|
20 | 20 | """Init (create) a roundup instance. |
21 | 21 | """ |
@@ -55,13 +55,15 @@ def copytree(src, dst, symlinks=0): |
55 | 55 | else: |
56 | 56 | install_util.copyDigestedFile(srcname, dstname) |
57 | 57 |
|
58 | | -def install(instance_home, template): |
| 58 | +def install(instance_home, template, settings={}): |
59 | 59 | '''Install an instance using the named template and backend. |
60 | 60 |
|
61 | 61 | 'instance_home' |
62 | 62 | the directory to place the instance data in |
63 | 63 | 'template' |
64 | 64 | the directory holding the template to use in creating the instance data |
| 65 | + 'settings' |
| 66 | + config.ini setting overrides (dictionary) |
65 | 67 |
|
66 | 68 | The instance_home directory will be created using the files found in |
67 | 69 | the named template (roundup.templates.<name>). A usual instance_home |
@@ -99,7 +101,7 @@ def install(instance_home, template): |
99 | 101 | # installed from the template, write default config text |
100 | 102 | config_ini_file = os.path.join(instance_home, CoreConfig.INI_FILE) |
101 | 103 | if not os.path.isfile(config_ini_file): |
102 | | - config = CoreConfig() |
| 104 | + config = CoreConfig(settings=settings) |
103 | 105 | config.save(config_ini_file) |
104 | 106 |
|
105 | 107 |
|
|
0 commit comments