Blame SOURCES/0026-Relocate-eval-of-debug-verbose-in-case-they-are-set-.patch

45cc94
From f28a5fb06a72eca6dc107f11dfd0673ecb92daac Mon Sep 17 00:00:00 2001
45cc94
From: Rob Crittenden <rcritten@redhat.com>
45cc94
Date: Thu Apr 28 08:57:38 2022 -0400
45cc94
Subject: Relocate eval of debug/verbose in case they are set in
45cc94
 config file
45cc94
45cc94
Since the configuration file allows options to be set we need
45cc94
to evaluate them after the merge.
45cc94
45cc94
Leaving version handling pre-config load since it makes no sense
45cc94
within the config file.
45cc94
45cc94
https://bugzilla.redhat.com/show_bug.cgi?id=2079861
45cc94
45cc94
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
45cc94
---
45cc94
 src/ipahealthcheck/core/core.py | 12 ++++++------
45cc94
 1 file changed, 6 insertions(+), 6 deletions(-)
45cc94
45cc94
diff --git a/src/ipahealthcheck/core/core.py b/src/ipahealthcheck/core/core.py
45cc94
index 98ca1d2..092bab9 100644
45cc94
--- a/src/ipahealthcheck/core/core.py
45cc94
+++ b/src/ipahealthcheck/core/core.py
45cc94
@@ -269,12 +269,6 @@ class RunChecks:
45cc94
         if rval:
45cc94
             return rval
45cc94
 
45cc94
-        if options.verbose:
45cc94
-            logger.setLevel(logging.INFO)
45cc94
-
45cc94
-        if options.debug:
45cc94
-            logger.setLevel(logging.DEBUG)
45cc94
-
45cc94
         if options.config is not None:
45cc94
             config = read_config(options.config)
45cc94
         else:
45cc94
@@ -289,6 +283,12 @@ class RunChecks:
45cc94
         self.options = config
45cc94
         options = config
45cc94
 
45cc94
+        if options.verbose:
45cc94
+            logger.setLevel(logging.INFO)
45cc94
+
45cc94
+        if options.debug:
45cc94
+            logger.setLevel(logging.DEBUG)
45cc94
+
45cc94
         rval = self.pre_check()
45cc94
         if rval is not None:
45cc94
             return rval
45cc94
-- 
45cc94
2.31.1
45cc94