Project

General

Profile

« Previous | Next » 

Revision 6b376cff

Added by Frédéric Péters almost 13 years ago

wcsinstd: do not fail on missing config.pck

View differences:

wcsinst/wcsinstd/deploy.py
open(path, 'w').write(data)
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
# (like the name of the database)
self.make_sso_config(wcs_cfg)
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.reload_apache()

Also available in: Unified diff