summaryrefslogtreecommitdiffstats
path: root/roles/lib_yaml_editor/build/src/base.py
blob: 9e43d45dce7fbde94cc6a2c3f29ce03d470532e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)