diff options
Diffstat (limited to 'roles/lib_yaml_editor/build/src/base.py')
-rw-r--r-- | roles/lib_yaml_editor/build/src/base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/lib_yaml_editor/build/src/base.py b/roles/lib_yaml_editor/build/src/base.py index ad8b041cf..9e43d45dc 100644 --- a/roles/lib_yaml_editor/build/src/base.py +++ b/roles/lib_yaml_editor/build/src/base.py @@ -5,5 +5,13 @@ 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) |