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

7ff681
From 9967eb8adbcf471d652337ed77add05480773a1a Mon Sep 17 00:00:00 2001
7ff681
From: Rob Crittenden <rcritten@redhat.com>
7ff681
Date: Thu, 28 Apr 2022 08:57:38 -0400
7ff681
Subject: [PATCH 8/9] Relocate eval of debug/verbose in case they are set in
7ff681
 config file
7ff681
7ff681
Since the configuration file allows options to be set we need
7ff681
to evaluate them after the merge.
7ff681
7ff681
Leaving version handling pre-config load since it makes no sense
7ff681
within the config file.
7ff681
7ff681
https://bugzilla.redhat.com/show_bug.cgi?id=2079861
7ff681
7ff681
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
7ff681
---
7ff681
 src/ipahealthcheck/core/core.py | 12 ++++++------
7ff681
 1 file changed, 6 insertions(+), 6 deletions(-)
7ff681
7ff681
diff --git a/src/ipahealthcheck/core/core.py b/src/ipahealthcheck/core/core.py
7ff681
index c04a6ee..6e6a928 100644
7ff681
--- a/src/ipahealthcheck/core/core.py
7ff681
+++ b/src/ipahealthcheck/core/core.py
7ff681
@@ -346,12 +346,6 @@ class RunChecks:
7ff681
         if rval is not None:
7ff681
             return rval
7ff681
 
7ff681
-        if options.verbose:
7ff681
-            logger.setLevel(logging.INFO)
7ff681
-
7ff681
-        if options.debug:
7ff681
-            logger.setLevel(logging.DEBUG)
7ff681
-
7ff681
         if options.config is not None:
7ff681
             config = read_config(options.config)
7ff681
         else:
7ff681
@@ -366,6 +360,12 @@ class RunChecks:
7ff681
         self.options = config
7ff681
         options = config
7ff681
 
7ff681
+        if options.verbose:
7ff681
+            logger.setLevel(logging.INFO)
7ff681
+
7ff681
+        if options.debug:
7ff681
+            logger.setLevel(logging.DEBUG)
7ff681
+
7ff681
         # pylint: disable=assignment-from-none
7ff681
         rval = self.pre_check()
7ff681
         # pylint: enable=assignment-from-none
7ff681
-- 
7ff681
2.31.1
7ff681