Force unicode for all strings

This commit is contained in:
pR0Ps 2014-12-24 23:37:35 -05:00
parent 0f9f83f005
commit 667260e324

View File

@ -58,6 +58,10 @@ try:
except ImportError: except ImportError:
from yaml import Loader from yaml import Loader
# Override the default string handling function to always return unicode objects
def construct_yaml_str(self, node):
return self.construct_scalar(node)
Loader.add_constructor(u'tag:yaml.org,2002:str', construct_yaml_str)
class MetaYamlExtension (Extension): class MetaYamlExtension (Extension):