mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
parent
bb3e98cad2
commit
2b5ad128bf
@ -9,6 +9,7 @@ from __future__ import absolute_import
|
||||
import logging
|
||||
import warnings
|
||||
from yaml.scanner import ScannerError
|
||||
from yaml.parser import ParserError
|
||||
from yaml.constructor import ConstructorError
|
||||
|
||||
# Import salt libs
|
||||
@ -52,7 +53,7 @@ def render(yaml_data, saltenv='base', sls='', argline='', **kws):
|
||||
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:
|
||||
except (ParserError, ConstructorError) as exc:
|
||||
raise SaltRenderError(exc)
|
||||
if len(warn_list) > 0:
|
||||
for item in warn_list:
|
||||
|
Loading…
Reference in New Issue
Block a user