If a python file that does import tuna, is run with a main section, it
will fail with the relative imports in tuna.py
from . import help
ImportError: attempted relative import with no known parent package
Fix this by with a non-relative style import.
This will also work with an installed version of tuna, but when running
from source in git it will require the user to add the tuna dir to the
PYTHONPATH as well as the base directory
Signed-off-by: John Kacur <jkacur(a)redhat.com>
---
tuna/tuna.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tuna/tuna.py b/tuna/tuna.py
index f25eb3d10923..6b6edcc8ff72 100755
--- a/tuna/tuna.py
+++ b/tuna/tuna.py
@@ -12,8 +12,8 @@ import platform
import ethtool
import procfs
from procfs import utilist
-from . import help
-import tuna.tuna_sched as tuna_sched
+import help
+import tuna_sched
try:
fntable
--
2.31.1