mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix potential python deps not being imported in web UI
This commit is contained in:
parent
413500e5d3
commit
3e63f2ad0c
1 changed files with 1 additions and 7 deletions
|
|
@ -8,13 +8,7 @@ from string import ascii_letters, digits
|
|||
from sys import path as sys_path, modules as sys_modules
|
||||
from pathlib import Path
|
||||
|
||||
os_release_path = Path(sep, "etc", "os-release")
|
||||
if os_release_path.is_file() and "Alpine" not in os_release_path.read_text(encoding="utf-8"):
|
||||
sys_path.append(join(sep, "usr", "share", "bunkerweb", "deps", "python"))
|
||||
|
||||
del os_release_path
|
||||
|
||||
for deps_path in [join(sep, "usr", "share", "bunkerweb", *paths) for paths in (("utils",), ("api",), ("db",))]:
|
||||
for deps_path in [join(sep, "usr", "share", "bunkerweb", *paths) for paths in (("deps", "python"), ("utils",), ("api",), ("db",))]:
|
||||
if deps_path not in sys_path:
|
||||
sys_path.append(deps_path)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue