Fix KB proposal dashboard runtime import path
This commit is contained in:
parent
0e812a74d7
commit
dfcc10e304
1 changed files with 7 additions and 3 deletions
|
|
@ -23,9 +23,13 @@ from aiohttp import web
|
||||||
from shared_ui import render_page
|
from shared_ui import render_page
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parent.parent
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
SCRIPTS_DIR = ROOT / "scripts"
|
SCRIPT_DIR_CANDIDATES = [
|
||||||
if str(SCRIPTS_DIR) not in sys.path:
|
ROOT / "scripts",
|
||||||
sys.path.insert(0, str(SCRIPTS_DIR))
|
Path(os.environ.get("TELEO_INFRA_REPO_DIR", "/opt/teleo-eval/workspaces/deploy-infra")) / "scripts",
|
||||||
|
]
|
||||||
|
for scripts_dir in SCRIPT_DIR_CANDIDATES:
|
||||||
|
if str(scripts_dir) not in sys.path:
|
||||||
|
sys.path.insert(0, str(scripts_dir))
|
||||||
|
|
||||||
import kb_proposal_review_packet as proposal_review # noqa: E402
|
import kb_proposal_review_packet as proposal_review # noqa: E402
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue