Fixed a bug with prepare_host failing upon existing ipatests folder

https://fedorahosted.org/freeipa/ticket/5748

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Oleg Fayans 2016-03-22 16:14:53 +01:00 committed by Martin Basti
parent 7289ad16cb
commit 2fa0952603

View File

@ -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()))