Merge "Check passwords.yml exist before init action"
This commit is contained in:
commit
3c78d808e1
|
@ -28,8 +28,10 @@ from kolla_cli.common.utils import get_kolla_etc
|
||||||
|
|
||||||
def _init_keys(path):
|
def _init_keys(path):
|
||||||
cmd = 'kolla-genpwd'
|
cmd = 'kolla-genpwd'
|
||||||
if os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
cmd = ' '.join((cmd, '-p', path))
|
raise Exception('The path %s does not exist' % path)
|
||||||
|
|
||||||
|
cmd = ' '.join((cmd, '-p', path))
|
||||||
(_, err) = subprocess.Popen(cmd, shell=True,
|
(_, err) = subprocess.Popen(cmd, shell=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE).communicate()
|
stderr=subprocess.PIPE).communicate()
|
||||||
|
|
Loading…
Reference in New Issue