Instead of making such a mess, use a relative import and let's call it a day.
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- virttest/kvm_qtree_unittest.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/virttest/kvm_qtree_unittest.py b/virttest/kvm_qtree_unittest.py index 96341f3..01e8691 100755 --- a/virttest/kvm_qtree_unittest.py +++ b/virttest/kvm_qtree_unittest.py @@ -8,14 +8,9 @@ This is a unittest for kvm_qtree library. __author__ = """Lukas Doktor ([email protected])""" import unittest -import sys -import os import common from autotest.client.shared.test_utils import mock -test_dir = os.path.abspath(os.path.dirname(os.path.dirname(sys.modules[__name__].__file__))) -print test_dir -sys.path.append(test_dir) -from virttest import kvm_qtree +import kvm_qtree OFFSET_PER_LEVEL = kvm_qtree.OFFSET_PER_LEVEL -- 1.7.11.4 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
