Fix Error during file validation
Error during lint: "UnboundLocalError: local variable 'documents' referenced before assignment Change-Id: I45fc0f6157bfae05ababadb2865ef1a023918bfd
This commit is contained in:
parent
97ef079d9e
commit
2d088b0ddd
|
@ -107,6 +107,7 @@ def _verify_single_file(filename, schemas):
|
|||
'%s does not begin with YAML beginning of document '
|
||||
'marker "---".' % filename))
|
||||
f.seek(0)
|
||||
documents = []
|
||||
try:
|
||||
documents = list(yaml.safe_load_all(f))
|
||||
except Exception as e:
|
||||
|
|
Loading…
Reference in New Issue