Commit c7b846b1 authored by Jérome Perrin's avatar Jérome Perrin

recipe/postgres: buildout options are strings

This was relying on a slapos patch allowing to serialize sets, but
that was not useful, because we had to encode the sets ourselves in the
profiles.
parent d1797e84
...@@ -134,8 +134,8 @@ class Recipe(GenericBaseRecipe): ...@@ -134,8 +134,8 @@ class Recipe(GenericBaseRecipe):
def createConfig(self): def createConfig(self):
pgdata = self.options['pgdata-directory'] pgdata = self.options['pgdata-directory']
ipv4 = self.options['ipv4'] ipv4 = self.options['ipv4'].splitlines()
ipv6 = self.options['ipv6'] ipv6 = self.options['ipv6'].splitlines()
with open(os.path.join(pgdata, 'postgresql.conf'), 'wb') as cfg: with open(os.path.join(pgdata, 'postgresql.conf'), 'wb') as cfg:
cfg.write(textwrap.dedent("""\ cfg.write(textwrap.dedent("""\
...@@ -154,7 +154,7 @@ class Recipe(GenericBaseRecipe): ...@@ -154,7 +154,7 @@ class Recipe(GenericBaseRecipe):
unix_socket_directories = '%s' unix_socket_directories = '%s'
unix_socket_permissions = 0700 unix_socket_permissions = 0700
""" % ( """ % (
','.join(ipv4.union(ipv6)), ','.join(set(ipv4).union(ipv6)),
pgdata, pgdata,
))) )))
......
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