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

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