Skip to content

Commit

Permalink
Merge pull request #52 from mdm/fix-exception-name-in-loader
Browse files Browse the repository at this point in the history
Fix name of `ConstructorError`
  • Loading branch information
jonas-eschle committed Mar 15, 2024
2 parents 71f46a1 + 7a1b7fb commit f80a54a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yamlloader/ordereddict/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def construct_mapping(self, node, deep=False):
self.flatten_mapping(node)
else:
msg = f"Expected a mapping node, but found {node.id}"
raise yaml.constructor.ConstructError(None, None, msg, node.start_mark)
raise yaml.constructor.ConstructorError(None, None, msg, node.start_mark)

mapping = OrderedDict()

Expand All @@ -30,7 +30,7 @@ def construct_mapping(self, node, deep=False):
try:
hash(key)
except TypeError as err:
raise yaml.constructor.ConstructError(
raise yaml.constructor.ConstructorError(
"while constructing a mapping",
node.start_mark,
f"found unacceptable key ({err})",
Expand Down

0 comments on commit f80a54a

Please sign in to comment.