Make sure postgresql.stop also return True if pg_ctl stop returned 0.

This commit is contained in:
Oleksii Kliukin
2015-07-27 11:23:08 +02:00
parent 201f9bf4b2
commit 115ba1d9ae
+1 -1
View File
@@ -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'])