From 76c1b5cf25bb7ad2a6e6e6b19e6cc3f0749ff512 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Thu, 2 Dec 2021 08:02:49 +0100 Subject: [PATCH] osbuild-mpp: ConstructorError was undefined ConstructorError is part of the yaml.constructor module. --- tools/osbuild-mpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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