Skip to content

Commit 39311e9

Browse files
author
Alexander Smishlajev
committed
install: accept configuration setting overrides
1 parent ba23bd2 commit 39311e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

roundup/init.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
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 $
1919

2020
"""Init (create) a roundup instance.
2121
"""
@@ -55,13 +55,15 @@ def copytree(src, dst, symlinks=0):
5555
else:
5656
install_util.copyDigestedFile(srcname, dstname)
5757

58-
def install(instance_home, template):
58+
def install(instance_home, template, settings={}):
5959
'''Install an instance using the named template and backend.
6060
6161
'instance_home'
6262
the directory to place the instance data in
6363
'template'
6464
the directory holding the template to use in creating the instance data
65+
'settings'
66+
config.ini setting overrides (dictionary)
6567
6668
The instance_home directory will be created using the files found in
6769
the named template (roundup.templates.<name>). A usual instance_home
@@ -99,7 +101,7 @@ def install(instance_home, template):
99101
# installed from the template, write default config text
100102
config_ini_file = os.path.join(instance_home, CoreConfig.INI_FILE)
101103
if not os.path.isfile(config_ini_file):
102-
config = CoreConfig()
104+
config = CoreConfig(settings=settings)
103105
config.save(config_ini_file)
104106

105107

0 commit comments

Comments
 (0)