From b2cd6d911318310159bcbbd31bf6711da776ffd4 Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Fri, 11 Dec 2015 10:36:39 +0100 Subject: [PATCH] Fix for the crash due to a missing initidb section in the configuration file --- patroni/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/postgresql.py b/patroni/postgresql.py index 5ea2b97c..45b871c2 100644 --- a/patroni/postgresql.py +++ b/patroni/postgresql.py @@ -198,7 +198,7 @@ class Postgresql: os.close(fd) options.append('--pwfile={}'.format(pwfile)) - ret = subprocess.call(self._pg_ctl + ['initdb'] + ['-o', ' '.join(options)] if options else []) == 0 + ret = subprocess.call(self._pg_ctl + ['initdb'] + (['-o', ' '.join(options)] if options else [])) == 0 if pwfile: os.remove(pwfile) if ret: