only deploy site template when creating the site (#5327)

This commit is contained in:
Frédéric Péters 2014-08-25 17:34:48 +02:00
parent 167bf19cbb
commit 26cca31caf
1 changed files with 10 additions and 10 deletions

View File

@ -53,17 +53,17 @@ class DeployInstance(object):
anew = True
os.mkdir(self.collectivity_install_dir, 0755)
z = zipfile.ZipFile(os.path.join(self.skel_dir, 'export.wcs'), 'r')
z = zipfile.ZipFile(os.path.join(self.skel_dir, 'export.wcs'), 'r')
os.umask(0022)
for f in z.namelist():
path = os.path.join(self.collectivity_install_dir, f)
data = z.read(f)
if not os.path.exists(os.path.dirname(path)):
os.mkdir(os.path.dirname(path), 0755)
if not f.endswith('/'):
open(path, 'w').write(data)
z.close()
os.umask(0022)
for f in z.namelist():
path = os.path.join(self.collectivity_install_dir, f)
data = z.read(f)
if not os.path.exists(os.path.dirname(path)):
os.mkdir(os.path.dirname(path), 0755)
if not f.endswith('/'):
open(path, 'w').write(data)
z.close()
config_file = os.path.join(self.collectivity_install_dir, 'config.pck')
if os.path.exists(config_file):