From 2fa09526031b770d6c16aacc76b476d1c3c2e3cb 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 f6390377d..93dfac1c6 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()))