]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: correct additional paths added to sys.path 36710/head
authorKefu Chai <kchai@redhat.com>
Wed, 19 Aug 2020 04:54:41 +0000 (12:54 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 19 Aug 2020 04:56:59 +0000 (12:56 +0800)
pybind_path and pythonlib_path are already absolute paths, they are
prepared before being passed to `respawn_in_path()`. so let's drop
path components prepended to them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/ceph.in

index 9a711d1b4c0598c1fae6c7ebd9405f3366d811df..d1f4d802214e9d87f44fc3f1695a7c06191ffa21 100755 (executable)
@@ -87,8 +87,8 @@ def respawn_in_path(lib_path, pybind_path, pythonlib_path, asan_lib_path):
         if "CEPH_DEV" not in os.environ:
             print(DEVMODEMSG, file=sys.stderr)
         os.execvp(execv_cmd[0], execv_cmd)
-    sys.path.insert(0, os.path.join(MYDIR, pybind_path))
-    sys.path.insert(0, os.path.join(MYDIR, pythonlib_path))
+    sys.path.insert(0, pybind_path)
+    sys.path.insert(0, pythonlib_path)
 
 
 def get_pythonlib_dir():