From d8b146ef85662677ac661e1606cb62e7b74d7d81 Mon Sep 17 00:00:00 2001 From: Vratislav Podzimek Date: Fri, 4 Sep 2015 13:01:33 +0200 Subject: [PATCH] Completely skip the execute() part if no profile is selected (#1254973) If user didn't select any profile in the GUI we shouldn't create the /root/openscap_data directory and shouldn't do any extra steps as those are not necessary and could cause confusion. Signed-off-by: Vratislav Podzimek --- org_fedora_oscap/ks/oscap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org_fedora_oscap/ks/oscap.py b/org_fedora_oscap/ks/oscap.py index c17a1ad..df92018 100644 --- a/org_fedora_oscap/ks/oscap.py +++ b/org_fedora_oscap/ks/oscap.py @@ -491,8 +491,9 @@ class OSCAPdata(AddonData): """ - if self.dry_run: - # nothing to be done in the dry-run mode + if self.dry_run or not self.profile_id: + # nothing more to be done in the dry-run mode or if no profile is + # selected return target_content_dir = utils.join_paths(getSysroot(), -- 2.1.0