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: Ia79600ebc228d8417342a0703167f34703169d5a
This commit is contained in:
parent
9853fcfbee
commit
6d7df808f3
@ -193,7 +193,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