From 80abe67ed2b4572c28363f6ef8ef3033ae9befe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Mart=C3=ADnez?= Date: Fri, 2 Sep 2016 16:42:40 +0200 Subject: [PATCH] Fix missing self --- patroni/postgresql.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patroni/postgresql.py b/patroni/postgresql.py index 62c7809d..879adb94 100644 --- a/patroni/postgresql.py +++ b/patroni/postgresql.py @@ -125,7 +125,7 @@ class Postgresql(object): @property def _configuration_to_save(self): configuration = [self._postgresql_conf] - if not config.get('custom_conf'): + if not self.config.get('custom_conf'): configuration.append(self._postgresql_base_conf) if not self.config['parameters'].get('hba_file'): configuration.append(os.path.join(self._data_dir, 'pg_hba.conf')) @@ -629,12 +629,12 @@ class Postgresql(object): def _write_postgresql_conf(self): # rename the original configuration if it is necessary - if not config.get('custom_conf') and not os.path.exists(self._postgresql_base_conf): + if not self.config.get('custom_conf') and not os.path.exists(self._postgresql_base_conf): os.rename(self._postgresql_conf, self._postgresql_base_conf) with open(self._postgresql_conf, 'w') as f: f.write('# Do not edit this file manually!\n# It will be overwritten by Patroni!\n') - f.write("include '{0}'\n\n".format(config.get('custom_conf') or self._postgresql_base_conf_name)) + f.write("include '{0}'\n\n".format(self.config.get('custom_conf') or self._postgresql_base_conf_name)) for name, value in sorted(self._server_parameters.items()): if name not in self.CMDLINE_OPTIONS: f.write("{0} = '{1}'\n".format(name, value))