# HG changeset patch # User Ludovic Chabant # Date 1426814922 25200 # Node ID 45aba3cb72287e793d87b44024584ee34e0b2187 # Parent 2daa05a210260154f224019bf994c617768a44c1 config: Make YAML consider `omap` structures as normal maps. diff -r 2daa05a21026 -r 45aba3cb7228 piecrust/configuration.py --- a/piecrust/configuration.py Wed Mar 11 23:48:35 2015 -0700 +++ b/piecrust/configuration.py Thu Mar 19 18:28:42 2015 -0700 @@ -219,7 +219,10 @@ class ConfigurationDumper(yaml.SafeDumper): def represent_ordered_dict(self, data): - return self.represent_mapping('tag:yaml.org,2002:omap', data) + # Not a typo: we're using `map` and not `omap` because we don't want + # ugly type tags printed in the generated YAML markup, and because + # we always load maps into `OrderedDicts` anyway. + return self.represent_mapping('tag:yaml.org,2002:map', data) ConfigurationDumper.add_representer(collections.OrderedDict,