Do not use yaml.load(file)

Now a Loader is required, as the default loader is considered unsafe.
See [1] for details.

[1] https://msg.pyyaml.org/load

Change-Id: I08af1afd6df097fab33701db89c656ebfe981b30
This commit is contained in:
Shachar Snapiri 2019-07-17 12:31:01 +03:00 committed by Shachar Snapiri
parent a1498f951f
commit c5d4f07a74
1 changed files with 2 additions and 1 deletions

View File

@ -53,8 +53,9 @@ def get_datapath_layout(path=None):
if path is None:
path = cfg.CONF.df.datapath_layout_path
# See https://msg.pyyaml.org/load
with open(path) as f:
raw_layout = yaml.load(f)
raw_layout = yaml.safe_load(f)
vertices = tuple(
Vertex(