summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2022-02-17 16:38:05 -0800
committerMatt Clay <matt@mystile.com>2022-02-21 22:07:02 -0800
commit5caa97962ecc1696f83b399e8aff264bea8a6203 (patch)
tree882268e13ac96b295726d1ff1ffb069e2981f136
parent010b1437433ed5ff4bda47f96a8737ba95e4882d (diff)
downloadansible-5caa97962ecc1696f83b399e8aff264bea8a6203.tar.gz
[stable-2.12] Fix warning in unit tests for _yaml import.
(cherry picked from commit de9a3bda2cfaace7e3d25b0c4774eefdd9514687) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--test/units/parsing/yaml/test_loader.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/units/parsing/yaml/test_loader.py b/test/units/parsing/yaml/test_loader.py
index d6989f444b..fbe69a9761 100644
--- a/test/units/parsing/yaml/test_loader.py
+++ b/test/units/parsing/yaml/test_loader.py
@@ -35,12 +35,8 @@ from ansible.parsing.yaml.dumper import AnsibleDumper
from units.mock.yaml_helper import YamlTestUtils
from units.mock.vault_helper import TextVaultSecret
-try:
- from _yaml import ParserError
- from _yaml import ScannerError
-except ImportError:
- from yaml.parser import ParserError
- from yaml.scanner import ScannerError
+from yaml.parser import ParserError
+from yaml.scanner import ScannerError
class NameStringIO(StringIO):