Add method to verifyu that the environment pis suitible

This commit is contained in:
Thomas S Hatch 2011-03-03 12:26:31 -07:00
parent 565a2b4a21
commit 69b09a3f1b

View file

@ -41,10 +41,19 @@ class Master(object):
return cli
def _verify_env(self):
'''
Verify that the named direcotries are in place and that the environment
can shake the salt
'''
if not os.path.isdir(self.opts['cachedir']):
os.makedirs(self.opts['cachedir'])
def start(self):
'''
Run the sequence to start a salt master server
'''
self._verify_env()
master = salt.master.Master(self.opts)
master.start()