From 1cec9d78eb88443cc981c692fa6f95c8dfffb84e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 5 Aug 2019 18:25:25 +0200 Subject: [PATCH] We need quotes here, otheriwse yaml isn't happy later when loading the metadata file --- src/yunohost/log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 0995dcc83..bf3535375 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -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)