From 26cca31caf4d1b8825f39fc20eb205213d1fbf0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 25 Aug 2014 17:34:48 +0200 Subject: [PATCH] only deploy site template when creating the site (#5327) --- wcsinst/wcsinstd/deploy.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wcsinst/wcsinstd/deploy.py b/wcsinst/wcsinstd/deploy.py index d030c9a..431f7cb 100644 --- a/wcsinst/wcsinstd/deploy.py +++ b/wcsinst/wcsinstd/deploy.py @@ -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):