diff --git a/moulinette/utils/filesystem.py b/moulinette/utils/filesystem.py index 737bdd18..bbea872c 100644 --- a/moulinette/utils/filesystem.py +++ b/moulinette/utils/filesystem.py @@ -9,6 +9,7 @@ from moulinette.core import MoulinetteError # Files & directories -------------------------------------------------- + def read_file(file_path): """ Read a regular text file @@ -94,6 +95,7 @@ def write_to_file(file_path, data, file_mode="w"): m18n.g('error_writing_file', file=file_path, error=str(e))) + def append_to_file(file_path, data): """ Append a single string or a list of string to a text file. diff --git a/moulinette/utils/process.py b/moulinette/utils/process.py index 6475f056..e48f27a9 100644 --- a/moulinette/utils/process.py +++ b/moulinette/utils/process.py @@ -106,7 +106,7 @@ def call_async_output(args, callback, **kwargs): # Call multiple commands ----------------------------------------------- def run_commands(cmds, callback=None, separate_stderr=False, shell=True, - **kwargs): + **kwargs): """Run multiple commands with error management Run a list of commands and allow to manage how to treat errors either