mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 22:19:25 +00:00
Merge pull request #49 from davidholsgrove/skip-empty-docs
Skip empty yaml docs
This commit is contained in:
commit
2e7c2bfe33
1 changed files with 2 additions and 0 deletions
|
|
@ -114,6 +114,8 @@ for crdFile in sys.argv[1:]:
|
|||
f = open(crdFile)
|
||||
with f:
|
||||
for y in yaml.load_all(f, Loader=yaml.SafeLoader):
|
||||
if y is None:
|
||||
continue
|
||||
if "kind" not in y:
|
||||
continue
|
||||
if y["kind"] != "CustomResourceDefinition":
|
||||
|
|
|
|||
Loading…
Reference in a new issue