Fix bug with block_literal_representer
When serializing a block literal, be explicit that we want to treat it as a string, instead of relying on implicit conversion. Change-Id: I01a06c49f6112ef3e4313030ada0a7ea6adb5fb4
This commit is contained in:
parent
4ed7005329
commit
88281bff56
@ -350,7 +350,8 @@ class block_literal(str):
|
||||
|
||||
|
||||
def block_literal_representer(dumper, data):
|
||||
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|')
|
||||
return dumper.represent_scalar(
|
||||
'tag:yaml.org,2002:str', str(data), style='|')
|
||||
|
||||
|
||||
yaml.add_representer(block_literal, block_literal_representer)
|
||||
|
Loading…
x
Reference in New Issue
Block a user