diff options
-rw-r--r-- | sos/plugins/python.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sos/plugins/python.py b/sos/plugins/python.py index 2c91f406..003fd308 100644 --- a/sos/plugins/python.py +++ b/sos/plugins/python.py @@ -11,7 +11,7 @@ from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class Python(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): +class Python(Plugin, DebianPlugin, UbuntuPlugin): """Python runtime """ @@ -23,4 +23,19 @@ class Python(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): def setup(self): self.add_cmd_output("python -V", suggest_filename="python-version") + +class RedHatPython(Python, RedHatPlugin): + + packages = ('python', 'python36', 'python2', 'platform-python') + + def setup(self): + self.add_cmd_output(['python2 -V', 'python3 -V']) + if self.policy.dist_version() > 7: + self.add_cmd_output( + '/usr/libexec/platform-python -V', + suggest_filename='python-version' + ) + else: + self.add_cmd_output('python -V', suggest_filename='python-version') + # vim: set et ts=4 sw=4 : |