aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2020-03-24 16:18:39 -0400
committerJake Hunsaker <jhunsake@redhat.com>2020-04-07 16:43:36 -0400
commit71428ba1bc664feedbb41ea3d4a5b44a5a096dac (patch)
tree36eb1f76aab369cdc57a1bc7016a0d911b41ef44 /bin
parentdfcabc689e0e5fdc40c6ecf3df2c92b3e4a8bdd1 (diff)
downloadsos-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-xbin/sosreport6
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()