wcsinstd: do not fail on missing config.pck
This commit is contained in:
parent
0d0991a3b1
commit
6b376cfffb
|
@ -60,14 +60,18 @@ class DeployInstance(object):
|
||||||
open(path, 'w').write(data)
|
open(path, 'w').write(data)
|
||||||
z.close()
|
z.close()
|
||||||
|
|
||||||
wcs_cfg = cPickle.load(file(os.path.join(self.collectivity_install_dir, 'config.pck')))
|
config_file = os.path.join(self.collectivity_install_dir, 'config.pck')
|
||||||
|
if os.path.exists(config_file):
|
||||||
|
wcs_cfg = cPickle.load(file(os.path.join(self.collectivity_install_dir, 'config.pck')))
|
||||||
|
else:
|
||||||
|
wcs_cfg = {}
|
||||||
# TODO: there are some settings to change in wcs_cfg
|
# TODO: there are some settings to change in wcs_cfg
|
||||||
# (like the name of the database)
|
# (like the name of the database)
|
||||||
|
|
||||||
self.make_sso_config(wcs_cfg)
|
self.make_sso_config(wcs_cfg)
|
||||||
self.make_site_options()
|
self.make_site_options()
|
||||||
|
|
||||||
cPickle.dump(wcs_cfg, file(os.path.join(self.collectivity_install_dir, 'config.pck'), 'w'))
|
cPickle.dump(wcs_cfg, file(config_file, 'w'))
|
||||||
|
|
||||||
self.make_apache_vhost()
|
self.make_apache_vhost()
|
||||||
self.reload_apache()
|
self.reload_apache()
|
||||||
|
|
Reference in New Issue