Commit cac4208e authored by Marco Mariani's avatar Marco Mariani

check that bin:initdb exists

parent e8bd7a7d
...@@ -83,8 +83,14 @@ class Recipe(GenericBaseRecipe): ...@@ -83,8 +83,14 @@ class Recipe(GenericBaseRecipe):
] ]
def check_exists(self, path):
if not os.path.isfile(path):
raise IOError('File not found: %s' % path)
def createCluster(self): def createCluster(self):
initdb_binary = os.path.join(self.options['bin'], 'initdb') initdb_binary = os.path.join(self.options['bin'], 'initdb')
self.check_exists(initdb_binary)
pgdata = self.options['pgdata-directory'] pgdata = self.options['pgdata-directory']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment