Use SafeLoader for config load
This commit is contained in:
parent
2afd064445
commit
6315a068d1
|
@ -33,7 +33,7 @@ from subprocess import run, PIPE
|
||||||
from sys import argv
|
from sys import argv
|
||||||
from syslog import syslog, openlog, closelog, LOG_AUTH
|
from syslog import syslog, openlog, closelog, LOG_AUTH
|
||||||
from yaml import load as yload
|
from yaml import load as yload
|
||||||
from yaml import BaseLoader, SafeLoader
|
from yaml import SafeLoader
|
||||||
|
|
||||||
import pvc.lib.provisioner
|
import pvc.lib.provisioner
|
||||||
import pvc.lib.vm
|
import pvc.lib.vm
|
||||||
|
@ -88,7 +88,7 @@ def read_config_from_yaml(cfgfile):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(cfgfile) as fh:
|
with open(cfgfile) as fh:
|
||||||
api_config = yload(fh, Loader=BaseLoader)["api"]
|
api_config = yload(fh, Loader=SafeLoader)["api"]
|
||||||
|
|
||||||
host = api_config["listen"]["address"]
|
host = api_config["listen"]["address"]
|
||||||
port = api_config["listen"]["port"]
|
port = api_config["listen"]["port"]
|
||||||
|
|
Loading…
Reference in New Issue