mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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 <mpolovka@redhat.com>
This commit is contained in:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user