File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -702,7 +702,7 @@ def get_action_tasks(data: AnsibleBaseYAMLObject, file: Lintable) -> list[Any]:
702702@lru_cache (maxsize = None )
703703def parse_yaml_linenumbers ( # noqa: max-complexity: 12
704704 lintable : Lintable ,
705- ) -> AnsibleBaseYAMLObject | AnsibleBaseYAMLObject :
705+ ) -> AnsibleBaseYAMLObject :
706706 """Parse yaml as ansible.utils.parse_yaml but with linenumbers.
707707
708708 The line numbers are stored in each node's LINE_NUMBER_KEY key.
@@ -746,7 +746,11 @@ def construct_mapping(
746746 if data is None :
747747 break
748748 result .append (data )
749- except (yaml .parser .ParserError , yaml .scanner .ScannerError ) as exc :
749+ except (
750+ yaml .parser .ParserError ,
751+ yaml .scanner .ScannerError ,
752+ yaml .constructor .ConstructorError ,
753+ ) as exc :
750754 raise RuntimeError ("Failed to load YAML file" ) from exc
751755
752756 if len (result ) == 0 :
You can’t perform that action at this time.
0 commit comments