diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-03-24 16:18:39 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-07 16:43:36 -0400 |
commit | 71428ba1bc664feedbb41ea3d4a5b44a5a096dac (patch) | |
tree | 36eb1f76aab369cdc57a1bc7016a0d911b41ef44 /bin | |
parent | dfcabc689e0e5fdc40c6ecf3df2c92b3e4a8bdd1 (diff) | |
download | sos-71428ba1bc664feedbb41ea3d4a5b44a5a096dac.tar.gz |
[global] Fix report import paths
Updates the uses of 'from sos.plugins' to 'from sos.report.plugins' in
order to fix imports across the project with the new tree organization.
Additionally, the legacy `sosreport` binary now injects the user's
current working directory into the path the python interpreter uses in
order to allow local execution from a git checkout.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sosreport | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/sosreport b/bin/sosreport index af6fab68..43d58acb 100755 --- a/bin/sosreport +++ b/bin/sosreport @@ -10,8 +10,12 @@ """ sos entry point. """ import sys +import os try: - from sos.sosreport import main + # allow running from the git checkout, even though as of 4.0 we are moving + # binaries into a bin/ top-level directory. + sys.path.append(os.getcwd()) + from sos.report.sosreport import main except KeyboardInterrupt: raise SystemExit() |