ipatests: do not collect systemd journal when logfile_dir is missing

If logs aren't collected to logfile_dir, skip collection of systemd
journal.

Related https://pagure.io/freeipa/issue/6971

Signed-off-by: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Tomas Krizek
2017-06-09 14:34:10 +02:00
committed by Martin Basti
parent 74d36a8af6
commit 44e3496bd1

View File

@@ -82,6 +82,9 @@ def collect_systemd_journal(node, hosts, test_config):
name = _get_logname_from_node(node)
logfile_dir = test_config.getoption('logfile_dir')
if logfile_dir is None:
return
for host in hosts:
log.info("Collecting journal from: %s", host.hostname)