summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2022-02-17 16:41:45 -0800
committerMatt Clay <matt@mystile.com>2022-02-22 11:59:39 -0800
commit2f0b8398c9d121494d432af6ad24a49160136d0f (patch)
tree7f47960718f495ffd326bb83575a08069f1dc1c4
parent7df9c1bc919f324c38f63ecc5e3fa46b62e73395 (diff)
downloadansible-2f0b8398c9d121494d432af6ad24a49160136d0f.tar.gz
[stable-2.12] ansible-test - Fix CParser import in yamllint.
(cherry picked from commit d286c2e8b35d8324f0a1d1b9843b0501712ec9e3) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--changelogs/fragments/ansible-test-yaml-import.yaml2
-rw-r--r--test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/ansible-test-yaml-import.yaml b/changelogs/fragments/ansible-test-yaml-import.yaml
new file mode 100644
index 0000000000..7613983169
--- /dev/null
+++ b/changelogs/fragments/ansible-test-yaml-import.yaml
@@ -0,0 +1,2 @@
+bugfixes:
+ - ansible-test - Import ``yaml.cyaml.CParser`` instead of ``_yaml.CParser`` in the ``yamllint`` sanity test.
diff --git a/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py b/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py
index 42822111be..7f9df40a7e 100644
--- a/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py
+++ b/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py
@@ -13,7 +13,7 @@ import yaml
from yaml.resolver import Resolver
from yaml.constructor import SafeConstructor
from yaml.error import MarkedYAMLError
-from _yaml import CParser # pylint: disable=no-name-in-module
+from yaml.cyaml import CParser
from yamllint import linter
from yamllint.config import YamlLintConfig