# HG changeset patch # User Franz Glasner # Date 1686427096 -7200 # Node ID 80d203ed355610592ece04ac3197b7a3c852e0e0 # Parent 2e7920b0b4d915f633f8a31816894a85114160cd FIX: The YAML loader had wrong format strings in its exception handlers. This is a code-path that is executed extremely rarely. diff -r 2e7920b0b4d9 -r 80d203ed3556 configmix/yaml.py --- a/configmix/yaml.py Sat Jun 10 21:38:13 2023 +0200 +++ b/configmix/yaml.py Sat Jun 10 21:58:16 2023 +0200 @@ -79,16 +79,14 @@ except TypeError as err: raise yaml.constructor.ConstructorError( 'while constructing a mapping', node.start_mark, - 'found unacceptable key (%s)' % (err, - key_node.start_mark) - ) + 'found unacceptable key (%s)' % (err, ), + key_node.start_mark) value = self.construct_object(value_node, deep=deep) if not self.__allow_duplicate_keys and key in mapping: raise yaml.constructor.ConstructorError( 'while constructing a mapping', node.start_mark, - 'found duplicate key %r (%s)' % (key, - key_node.start_mark) - ) + 'found duplicate key %r' % (key, ), + key_node.start_mark) mapping[key] = value return mapping @@ -144,7 +142,6 @@ None, 'expected a mapping node, but found %s' % node.id, node.start_mark) - mapping = DictImpl() for key_node, value_node in node.value: key = self.construct_object(key_node, deep=deep) @@ -153,16 +150,14 @@ except TypeError as err: raise yaml.constructor.ConstructorError( 'while constructing a mapping', node.start_mark, - 'found unacceptable key (%s)' % (err, - key_node.start_mark) - ) + 'found unacceptable key (%s)' % (err, ), + key_node.start_mark) value = self.construct_object(value_node, deep=deep) if not self.__allow_duplicate_keys and key in mapping: raise yaml.constructor.ConstructorError( 'while constructing a mapping', node.start_mark, - 'found duplicate key %r (%s)' % (key, - key_node.start_mark) - ) + 'found duplicate key %r' % (key, ), + key_node.start_mark) mapping[key] = value return mapping