aboutsummaryrefslogtreecommitdiffstats
path: root/sos/plugins/__init__.py
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-07-07 16:16:41 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-07-07 16:16:41 +0100
commit10e5987331faf35628357f29d7a21e5d386c8c3c (patch)
treec7ffcf8b8ec0f7bc064c115d0d48769d4786f1b1 /sos/plugins/__init__.py
parent244b96d502248fb22511dfcb515e5f7c3e44d64e (diff)
downloadsos-10e5987331faf35628357f29d7a21e5d386c8c3c.tar.gz
[plugin] Use superclass __doc__ if not defined in derived class
Fixes #320. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'sos/plugins/__init__.py')
-rw-r--r--sos/plugins/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index f65c19fc..08cabc8d 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -619,9 +619,12 @@ class Plugin(object):
def get_description(self):
""" This function will return the description for the plugin"""
try:
- return self.__doc__.strip()
- except:
- return "<no description available>"
+ if hasattr(self, '__doc__') and self.__doc__:
+ return self.__doc__.strip()
+ return super(self.__class__, self).__doc__.strip()
+ except Exception as e:
+ raise e
+ #return "<no description available>"
def check_enabled(self):
"""This method will be used to verify that a plugin should execute