fix: do not add multi \n at ends of export

This commit is contained in:
egarette@silique.fr 2025-03-28 08:32:02 +01:00
parent 66f044bee3
commit 5f46162790
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ class RougailOutputFormatter:
self.default_flow_style = False
with BytesIO() as ymlfh:
self.yaml.dump(self.families[None], ymlfh)
ret = ymlfh.getvalue().decode("utf-8").strip() + '\n'
ret = ymlfh.getvalue().decode("utf-8").strip()
return True, ret
def print(self):

View file

@ -32,7 +32,7 @@ def _test_structural_files(file_name, namespace, rougailconfig):
rougailconfig['step.output'] = 'formatter'
##################################
config = None
generated_output = RougailOutput(config, rougailconfig=rougailconfig).run()[1]
generated_output = RougailOutput(config, rougailconfig=rougailconfig).run()[1] + '\n'
output_file = get_output_director(namespace) / file_name.parent.parent.name / file_name.parent.name / file_name.name
if not output_file.is_file():
if not output_file.parent.is_dir():