在python代码中加载yaml文件时,有没有办法避免重复键?

时间:2018-02-28 11:09:24

标签: python yaml

在build1下给出两次步骤时,有没有办法引发异常(请查看file.yaml内容)。

我正在使用f = yaml.load(打开(file.yaml,' r'))

file.yaml content - 
build1:
  step: 'step1'
  time: '20s'
  step: 'step2'

build2:
  step: 'step1'

0 个答案:

没有答案