From f28a5fb06a72eca6dc107f11dfd0673ecb92daac Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu Apr 28 08:57:38 2022 -0400 Subject: 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 --- 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 98ca1d2..092bab9 100644 --- a/src/ipahealthcheck/core/core.py +++ b/src/ipahealthcheck/core/core.py @@ -269,12 +269,6 @@ class RunChecks: if rval: 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: @@ -289,6 +283,12 @@ class RunChecks: self.options = config options = config + if options.verbose: + logger.setLevel(logging.INFO) + + if options.debug: + logger.setLevel(logging.DEBUG) + rval = self.pre_check() if rval is not None: return rval -- 2.31.1