Skip to content
Snippets Groups Projects
Commit 4cd0dba0 authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

Add possibility to give a logger to utils.run_cmd().

By default, it uses the default logger. But, when called from a different process, it should use the given logger, which will give information to a queue
parent 131c97c0
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,8 @@ def run_cmd(cmd, error, eof=False, **kwargs):
Run the given command line. If the return code is not 0, print error message.
if eof (exit on fail) is True, exit program if error code is not 0.
"""
logger = logging.getLogger("utils.run_cmd")
if not "logger" in kwargs:
logger = logging.getLogger("utils.run_cmd")
if not "stdout" in kwargs:
kwargs["stdout"] = None
if not "stderr" in kwargs:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment