From db184e4c3951dbee5b124dae71097ccdc9c1fdeb Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Thu, 5 Feb 2015 16:31:37 +0100 Subject: [PATCH] capture stderr as well as stdout when diagnosing This fixes OCA/server-tools#125 because in some Ubuntu systems lsb_release outputs to stderr as well as stdout. This message will be printed to console, not logged nor shown among server infomation. That way the message is lost and only pollutes unit tests output. --- server_environment/system_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server_environment/system_info.py b/server_environment/system_info.py index fd590eaf..ecac7286 100644 --- a/server_environment/system_info.py +++ b/server_environment/system_info.py @@ -30,7 +30,8 @@ def _get_output(cmd): bindir = config['root_path'] - p = subprocess.Popen(cmd, shell=True, cwd=bindir, stdout=subprocess.PIPE) + p = subprocess.Popen(cmd, shell=True, cwd=bindir, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) return p.communicate()[0].rstrip()