deploy: do not try to open directories

This commit is contained in:
Benjamin Dauvergne 2013-09-21 01:40:03 +02:00
parent 21eae031e4
commit ebf64b060e
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ class DeployInstance(object):
data = z.read(f)
if not os.path.exists(os.path.dirname(path)):
os.mkdir(os.path.dirname(path))
open(path, 'w').write(data)
if not f.endswith('/'):
open(path, 'w').write(data)
z.close()
config_file = os.path.join(self.collectivity_install_dir, 'config.pck')