From df134533888efc151817a6eb24e463aec63cb732 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 16 Sep 2007 21:27:11 +0000 Subject: [PATCH] revert bad commit from [8817]. fixes #3443 --- src/common/helpers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/helpers.py b/src/common/helpers.py index 732c0be81..178b51302 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -722,10 +722,11 @@ def get_os_info(): full_path_to_executable = is_in_path(executable, return_abs_path = True) if full_path_to_executable: command = executable + params - p = Popen([command], shell=True, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, close_fds=True) - p.wait() - output = temp_failure_retry(p.stdout.readline).strip() + child_stdin, child_stdout = os.popen2(command) + output = temp_failure_retry(child_stdout.readline).strip() + child_stdout.close() + child_stdin.close() + os.wait() # some distros put n/a in places, so remove those output = output.replace('n/a', '').replace('N/A', '') return output