Mercurial > piecrust2
diff piecrust/commands/builtin/info.py @ 107:10fc9c8bf682
Better support for times in YAML interop.
* Use our own sexagesimal parser/dumper for YAML to properly parse times.
* Better name for the custom parser/dumper classes.
* Add unit tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 15 Oct 2014 23:01:05 -0700 |
parents | 474c9882decf |
children | 516db87a04d4 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/info.py Wed Oct 15 21:18:27 2014 -0700 +++ b/piecrust/commands/builtin/info.py Wed Oct 15 23:01:05 2014 -0700 @@ -2,6 +2,7 @@ import logging import fnmatch from piecrust.commands.base import ChefCommand +from piecrust.configuration import ConfigurationDumper logger = logging.getLogger(__name__) @@ -36,7 +37,8 @@ if show is not None: if isinstance(show, (dict, list)): import yaml - out = yaml.safe_dump(show, default_flow_style=False) + out = yaml.dump(show, default_flow_style=False, + Dumper=ConfigurationDumper) logger.info(out) else: logger.info(show)