mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Always let the real YAML error through
The real message is always (probably) going to be more helpful than "Unknown".
This commit is contained in:
parent
1b86460d73
commit
e01a7a90b3
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ def render(yaml_data, saltenv='base', sls='', argline='', **kws):
|
|||
try:
|
||||
data = load(yaml_data, Loader=get_yaml_loader(argline))
|
||||
except ScannerError as exc:
|
||||
err_type = _ERROR_MAP.get(exc.problem, 'Unknown yaml render error')
|
||||
err_type = _ERROR_MAP.get(exc.problem, exc.problem)
|
||||
line_num = exc.problem_mark.line + 1
|
||||
raise SaltRenderError(err_type, line_num, exc.problem_mark.buffer)
|
||||
except ConstructorError as exc:
|
||||
|
|
Loading…
Add table
Reference in a new issue