From 645f7f6dacdf4306a8823bb24637a74f620380be Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Fri, 18 Jun 2021 16:00:49 +0200 Subject: [PATCH] Expand sos report plugin compatibility sos 4 now uses sos.report.plugin when sos 3 was using sos.plugins. This change allows compatibility with both. --- tools/sosreport/tower.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/sosreport/tower.py b/tools/sosreport/tower.py index 4d1b1e118e..a8f29f3b45 100644 --- a/tools/sosreport/tower.py +++ b/tools/sosreport/tower.py @@ -1,7 +1,10 @@ # Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. -from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin +try: + from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin +except ImportError: + from sos.report.plugins import Plugin, RedHatPlugin, UbuntuPlugin SOSREPORT_TOWER_COMMANDS = [ "awx-manage --version", # tower version