diff --git a/tools/osbuild-mpp b/tools/osbuild-mpp index 0c956954..1d8d21ae 100755 --- a/tools/osbuild-mpp +++ b/tools/osbuild-mpp @@ -281,15 +281,15 @@ from osbuild.util.rhsm import Subscriptions class YamlOrderedLoader(yaml.Loader): def construct_mapping(self, node, deep=False): if not isinstance(node, yaml.MappingNode): - raise ConstructorError(None, None, - "expected a mapping node, but found %s" % node.id, - node.start_mark) + raise yaml.constructor.ConstructorError(None, None, + "expected a mapping node, but found %s" % node.id, + node.start_mark) mapping = collections.OrderedDict() for key_node, value_node in node.value: key = self.construct_object(key_node, deep=deep) if not isinstance(key, collections.abc.Hashable): - raise ConstructorError("while constructing a mapping", node.start_mark, - "found unhashable key", key_node.start_mark) + raise yaml.constructor.ConstructorError("while constructing a mapping", node.start_mark, + "found unhashable key", key_node.start_mark) value = self.construct_object(value_node, deep=deep) mapping[key] = value return mapping