From 44e3496bd1a3004bc7a6497cbd212bba7910b2e3 Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Jun 15 2017 11:52:50 +0000 Subject: 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 Reviewed-By: Martin Basti Reviewed-By: Alexander Bokovoy --- diff --git a/ipatests/pytest_plugins/integration/__init__.py b/ipatests/pytest_plugins/integration/__init__.py index 20e60e9..6191c66 100644 --- a/ipatests/pytest_plugins/integration/__init__.py +++ b/ipatests/pytest_plugins/integration/__init__.py @@ -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)