Add correct yaml open

This commit is contained in:
Joshua Boniface 2019-03-12 23:11:10 -04:00
parent fb3cf827a2
commit 498259fc29
1 changed files with 2 additions and 1 deletions

View File

@ -1276,7 +1276,8 @@ def cli(_zk_host):
if _zk_host is None:
try:
cfgfile = '/etc/pvc/pvcd.yaml'
o_config = yaml.load(cfgfile)
with open(cfgfile) as cfgf:
o_config = yaml.load(cfgf)
_zk_host = o_config['pvc']['cluster']['coordinators']
except:
_zk_host = None