mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Revert "Fix UI shenanigans with python deps"
This reverts commit 70ab9740d9
.
This commit is contained in:
parent
70ab9740d9
commit
0e9f29cc52
1 changed files with 12 additions and 9 deletions
|
@ -1,16 +1,21 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from os.path import basename, dirname, join, sep
|
||||
from os import _exit, getenv, listdir, sep, urandom
|
||||
from os.path import basename, dirname, join
|
||||
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 (
|
||||
("deps", "python"),
|
||||
("utils",),
|
||||
("api",),
|
||||
("db",),
|
||||
)
|
||||
for paths in (("utils",), ("api",), ("db",))
|
||||
]:
|
||||
if deps_path not in sys_path:
|
||||
sys_path.append(deps_path)
|
||||
|
@ -56,8 +61,6 @@ from jinja2 import Template
|
|||
from kubernetes import client as kube_client
|
||||
from kubernetes import config as kube_config
|
||||
from kubernetes.client.exceptions import ApiException as kube_ApiException
|
||||
from os import _exit, getenv, listdir, urandom
|
||||
from pathlib import Path
|
||||
from re import compile as re_compile
|
||||
from regex import match as regex_match
|
||||
from requests import get
|
||||
|
|
Loading…
Reference in a new issue