Skip to content

Commit eb42256

Browse files
author
James William Pye
committed
three states: void, stopped, running. closes #16
1 parent f40e413 commit eb42256

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

postgresql/cluster.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class Cluster(pg_api.Cluster):
6565
def state(self):
6666
if self.running():
6767
return 'running'
68-
return 'not running'
68+
if not os.path.exists(self.data_directory):
69+
return 'void'
70+
return 'stopped'
6971

7072
def _e_metas(self):
7173
state = self.state

0 commit comments

Comments
 (0)