]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/__init__.py
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / __init__.py
index feefda948163cb1962046b81c50b5c27adb1e44a..653474c6304dba59240d46618b6baffa677d03c4 100644 (file)
@@ -3,7 +3,6 @@
 """
 ceph dashboard module
 """
-from __future__ import absolute_import
 
 import os
 
@@ -36,8 +35,6 @@ else:
     import logging
     logging.basicConfig(level=logging.DEBUG)
     logging.root.handlers[0].setLevel(logging.DEBUG)
-    os.environ['PATH'] = '{}:{}'.format(os.path.abspath('../../../../build/bin'),
-                                        os.environ['PATH'])
     import sys
 
     # Used to allow the running of a tox-based yml doc generator from the dashboard directory
@@ -47,7 +44,9 @@ else:
     from tests import mock  # type: ignore
 
     mgr = mock.Mock()
-    mgr.get_frontend_path.side_effect = lambda: os.path.abspath("./frontend/dist")
+    mgr.get_frontend_path.return_value = os.path.abspath(os.path.join(
+        os.path.dirname(__file__),
+        'frontend/dist'))
 
 # DO NOT REMOVE: required for ceph-mgr to load a module
 from .module import Module, StandbyModule  # noqa: F401