From df816e34ec8b945d014a45437bf83030a1e2b162 Mon Sep 17 00:00:00 2001 From: Oleg Fayans Date: Tue, 22 Mar 2016 16:14:53 +0100 Subject: [PATCH] Fixed a bug with prepare_host failing upon existing ipatests folder https://fedorahosted.org/freeipa/ticket/5748 Reviewed-By: Martin Basti --- ipatests/test_integration/tasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index 4c631c268..46283af55 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -81,7 +81,11 @@ def prepare_host(host): host.run_command(['true'], set_env=False) host.collect_log(env_filename) - host.transport.mkdir_recursive(host.config.test_dir) + try: + host.transport.mkdir_recursive(host.config.test_dir) + except IOError: + # The folder already exists + pass host.put_file_contents(env_filename, env_to_script(host.to_env()))