From b10e43c3eab01c4c2ec7c9a803ef67477f97bedd Mon Sep 17 00:00:00 2001 From: Sergey Orlov Date: Fri, 1 Nov 2019 10:47:34 +0100 Subject: [PATCH] ipatests: strip newline character when getting name of temp file Function create_temp_file was returning unprocessed output of mktemp command, which contains a trailing newline. Callers which tryed to write to the temp file were creating a new one instead. Reviewed-By: Michal Polovka --- ipatests/pytest_ipa/integration/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index b40407973..e88830489 100644 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -1870,7 +1870,7 @@ def create_temp_file(host, directory=None): cmd = ['mktemp'] if directory is not None: cmd += ['-p', directory] - return host.run_command(cmd).stdout_text + return host.run_command(cmd).stdout_text.strip() def create_active_user(host, login, password, first='test', last='user'):