Merge "Fix bug with block_literal_representer"

This commit is contained in:
Zuul 2020-09-24 15:49:56 +00:00 committed by Gerrit Code Review
commit c55dc2346e
1 changed files with 2 additions and 1 deletions

View File

@ -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)