Commit fad66997 authored by Vincent Pelletier's avatar Vincent Pelletier

Add support for non-string storage definition.

In preparation for better ERP5 clusterisation.
parent 020bb119
......@@ -56,7 +56,9 @@ class Recipe(GenericBaseRecipe):
'zeo-filestorage-snippet.conf.in')
# Prepare all filestorages
filestorage_snippet = ""
for storage_definition in self.options['storage'].splitlines():
storage = self.options['storage']
if isinstance(storage, basestring):
for storage_definition in storage.splitlines():
storage_definition = storage_definition.strip()
if not storage_definition:
continue
......@@ -67,6 +69,10 @@ class Recipe(GenericBaseRecipe):
zodb_path = q.split('=')[1].strip()
filestorage_snippet += self.substituteTemplate(
snippet_filename, dict(storage_name=storage_name, path=zodb_path))
else:
for storage_name, path in storage:
filestorage_snippet += self.substituteTemplate(snippet_filename,
{'storage_name': storage_name, 'path': path})
config = dict(
zeo_ip=self.options['ip'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment