mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Also redact metadata file
This commit is contained in:
parent
e42ce99660
commit
4269c10b80
1 changed files with 4 additions and 1 deletions
|
@ -375,8 +375,11 @@ class OperationLogger(object):
|
||||||
Write or rewrite the metadata file with all metadata known
|
Write or rewrite the metadata file with all metadata known
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
dump = yaml.safe_dump(self.metadata, default_flow_style=False)
|
||||||
|
for data in self.data_to_redact:
|
||||||
|
dump = dump.replace(data, "**********")
|
||||||
with open(self.md_path, 'w') as outfile:
|
with open(self.md_path, 'w') as outfile:
|
||||||
yaml.safe_dump(self.metadata, outfile, default_flow_style=False)
|
outfile.write(dump)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue