diff options
Diffstat (limited to 'roles/lib_yaml_editor/build/src/base.py')
-rw-r--r-- | roles/lib_yaml_editor/build/src/base.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/lib_yaml_editor/build/src/base.py b/roles/lib_yaml_editor/build/src/base.py new file mode 100644 index 000000000..9e43d45dc --- /dev/null +++ b/roles/lib_yaml_editor/build/src/base.py @@ -0,0 +1,17 @@ +# pylint: skip-file + +''' +module for managing yaml files +''' + +import os +import re + +import yaml +# This is here because of a bug that causes yaml +# to incorrectly handle timezone info on timestamps +def timestamp_constructor(_, node): + ''' return timestamps as strings''' + return str(node.value) +yaml.add_constructor(u'tag:yaml.org,2002:timestamp', timestamp_constructor) + |