aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-05-28 19:17:27 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-06-20 18:01:21 +0100
commitc65e99f2d456caaf9123be6c40e44c7ab9432b50 (patch)
treee0f89629ba2042707e72a4ebcc322963fd1739ce
parente5e372c749048387e2ed2c526c056c4e8533defa (diff)
downloadsos-c65e99f2d456caaf9123be6c40e44c7ab9432b50.tar.gz
[sos] simplify SoSOptions.merge()
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/__init__.py b/sos/__init__.py
index 3356e034..155c369d 100644
--- a/sos/__init__.py
+++ b/sos/__init__.py
@@ -188,11 +188,12 @@ class SoSOptions(object):
for arg in _arg_names:
if not hasattr(src, arg):
continue
+ if _is_seq(getattr(self, arg)):
+ self._merge_opt(arg, src, replace)
+ continue
if arg in _arg_defaults.keys():
if replace or getattr(self, arg) == _arg_defaults[arg]:
self._merge_opt(arg, src, replace)
- elif _is_seq(getattr(self, arg)):
- self._merge_opt(arg, src, replace)
else:
if replace or not getattr(self, arg):
self._merge_opt(arg, src, replace)