Fix for the crash due to a missing initidb section in the configuration file

This commit is contained in:
Oleksii Kliukin
2015-12-11 10:36:39 +01:00
parent 39beb9cbb3
commit b2cd6d9113
+1 -1
View File
@@ -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: