diff options
author | Karel Kočí <cynerd@email.cz> | 2015-08-18 15:48:11 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-08-18 15:48:11 +0200 |
commit | 170aa9baa8580763361348545b49d435ec0b172b (patch) | |
tree | 51af9adfeb623d58f1475585ef9d33bdcc3508e9 | |
parent | 742e5fb2ba1077407407a9b9108be43c6004d453 (diff) | |
download | linux-conf-perf-170aa9baa8580763361348545b49d435ec0b172b.tar.gz linux-conf-perf-170aa9baa8580763361348545b49d435ec0b172b.tar.bz2 linux-conf-perf-170aa9baa8580763361348545b49d435ec0b172b.zip |
Write stderr to log file together with stdout
Utils function callsubprocess now logs all program output including
stderr.
Convenient would be to print stderr even if output is disabled. But
this would probably required threads.
-rw-r--r-- | scripts/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/utils.py b/scripts/utils.py index 7a7a79d..742aec5 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -31,7 +31,8 @@ def build_symbol_map(): def callsubprocess(process_name, process, show_output = True, return_output = False, env=os.environ, allowed_exit_codes = [0], allow_all_exit_codes = False): - sprc = subprocess.Popen(process, stdout = subprocess.PIPE, env = env) + sprc = subprocess.Popen(process, stdout = subprocess.PIPE, + stderr = subprocess.STDOUT, env = env) try: os.mkdir(os.path.join(sf(conf.log_folder), process_name)) |