From 885da2c88a214eddd8c5ba16118debdf7e8f2666 Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Mar 26 2018 18:55:41 +0000 Subject: TESTS: Make get_call_output() more flexible about the stderr log Future tests that will be added will need the stderr redirected to the STDOUT. Related: https://pagure.io/SSSD/sssd/issue/3658 Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Jakub Hrozek --- diff --git a/src/tests/intg/util.py b/src/tests/intg/util.py index a1c4396..bfebbfb 100644 --- a/src/tests/intg/util.py +++ b/src/tests/intg/util.py @@ -80,8 +80,8 @@ def restore_envvar_file(name): os.rename(backup_path, path) -def get_call_output(cmd): +def get_call_output(cmd, stderr_output=subprocess.PIPE): process = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stderr=stderr_output) output, ret = process.communicate() return output.decode('utf-8')