Force unicode for all strings
This commit is contained in:
parent
0f9f83f005
commit
667260e324
@ -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):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user