From 115ba1d9ae2cf4c87526d5fcb2ccc92b58414fde Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Mon, 27 Jul 2015 11:23:08 +0200 Subject: [PATCH] Make sure postgresql.stop also return True if pg_ctl stop returned 0. --- helpers/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/postgresql.py b/helpers/postgresql.py index 71eb7d9c..da2d1fdf 100644 --- a/helpers/postgresql.py +++ b/helpers/postgresql.py @@ -286,7 +286,7 @@ class Postgresql: ret = subprocess.call(self._pg_ctl + ['stop', '-m', 'fast']) if ret == 0 and 'on_stop' in self.callback: self.call_nowait('on_stop', is_leader=is_leader) - return ret != 0 + return ret == 0 def reload(self): ret = subprocess.call(self._pg_ctl + ['reload'])