Add correct yaml open
This commit is contained in:
parent
fb3cf827a2
commit
498259fc29
|
@ -1276,7 +1276,8 @@ def cli(_zk_host):
|
||||||
if _zk_host is None:
|
if _zk_host is None:
|
||||||
try:
|
try:
|
||||||
cfgfile = '/etc/pvc/pvcd.yaml'
|
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']
|
_zk_host = o_config['pvc']['cluster']['coordinators']
|
||||||
except:
|
except:
|
||||||
_zk_host = None
|
_zk_host = None
|
||||||
|
|
Loading…
Reference in New Issue