We need quotes here, otheriwse yaml isn't happy later when loading the metadata file

This commit is contained in:
Alexandre Aubin 2019-08-05 18:25:25 +02:00
parent d507d447dd
commit 1cec9d78eb

View file

@ -401,7 +401,8 @@ class OperationLogger(object):
dump = yaml.safe_dump(self.metadata, default_flow_style=False)
for data in self.data_to_redact:
dump = dump.replace(data, "**********")
# N.B. : we need quotes here, otherwise yaml isn't happy about loading the yml later
dump = dump.replace(data, "'**********'")
with open(self.md_path, 'w') as outfile:
outfile.write(dump)