aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2021-05-17 19:40:08 -0400
committerJake Hunsaker <jhunsake@redhat.com>2021-05-19 10:47:15 -0400
commite056a20d8e3019c35ad58a547e7394c20c566910 (patch)
treeb21e428ed67e577e9bc1faded894659d7113842a
parent3f5c4784af818959f9b2d942f0fc9f2ca50ac36c (diff)
downloadsos-e056a20d8e3019c35ad58a547e7394c20c566910.tar.gz
[Plugin] Set option_list by default to empty list
Rather than relying on a `getattr()` check returning False during a plugin's initialization, simply set `option_list` to default to an empty list. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py
index 0fabbbd0..73490f93 100644
--- a/sos/report/plugins/__init__.py
+++ b/sos/report/plugins/__init__.py
@@ -461,6 +461,7 @@ class Plugin(object):
_timeout_hit = False
cmdtags = {}
filetags = {}
+ option_list = []
# Default predicates
predicate = None
@@ -476,8 +477,6 @@ class Plugin(object):
]
def __init__(self, commons):
- if not getattr(self, "option_list", False):
- self.option_list = []
self.copied_files = []
self.executed_commands = []