Blame SOURCES/sos-bz1912889-plugopts-ignored-in-configfile.patch

8bcace
From cd56e096afc8ef06c215c45cbf025bda60f0169c Mon Sep 17 00:00:00 2001
8bcace
From: Pavel Moravec <pmoravec@redhat.com>
8bcace
Date: Tue, 5 Jan 2021 15:06:24 +0100
8bcace
Subject: [PATCH] [component] honour plugopts from config file
8bcace
8bcace
Currently, config file plugopts are ignored as we overwrite it
8bcace
in apply_options_from_cmdline by empty list default value from
8bcace
cmdline.
8bcace
8bcace
Resolves: #2359
8bcace
8bcace
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
8bcace
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
8bcace
---
8bcace
 sos/component.py | 2 +-
8bcace
 1 file changed, 1 insertion(+), 1 deletion(-)
8bcace
8bcace
diff --git a/sos/component.py b/sos/component.py
8bcace
index 7774c05a..bd008761 100644
8bcace
--- a/sos/component.py
8bcace
+++ b/sos/component.py
8bcace
@@ -192,7 +192,7 @@ class SoSComponent():
8bcace
         for opt, val in codict.items():
8bcace
             if opt not in cmdopts.arg_defaults.keys():
8bcace
                 continue
8bcace
-            if val is not None and val != opts.arg_defaults[opt]:
8bcace
+            if val not in [None, [], ''] and val != opts.arg_defaults[opt]:
8bcace
                 setattr(opts, opt, val)
8bcace
 
8bcace
         return opts
8bcace
-- 
8bcace
2.26.2
8bcace