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