mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-26 01:03:35 +05:00
fix(extensions): fix import
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -9,12 +9,12 @@
|
|||||||
import shutil
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from components.webui_client.client_utils import create_nginx_cfg
|
||||||
from core.constants import NGINX_SITES_AVAILABLE, NGINX_SITES_ENABLED
|
from core.constants import NGINX_SITES_AVAILABLE, NGINX_SITES_ENABLED
|
||||||
from core.logger import DialogType, Logger
|
from core.logger import DialogType, Logger
|
||||||
from extensions.base_extension import BaseExtension
|
from extensions.base_extension import BaseExtension
|
||||||
from utils.common import check_install_dependencies
|
from utils.common import check_install_dependencies
|
||||||
from utils.fs_utils import (
|
from utils.fs_utils import (
|
||||||
create_nginx_cfg,
|
|
||||||
remove_file,
|
remove_file,
|
||||||
)
|
)
|
||||||
from utils.git_utils import git_clone_wrapper, git_pull_wrapper
|
from utils.git_utils import git_clone_wrapper, git_pull_wrapper
|
||||||
@@ -51,14 +51,11 @@ class PrettyGcodeExtension(BaseExtension):
|
|||||||
check_install_dependencies({"nginx"})
|
check_install_dependencies({"nginx"})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# remove any existing pgc dir
|
|
||||||
if PGC_DIR.exists():
|
if PGC_DIR.exists():
|
||||||
shutil.rmtree(PGC_DIR)
|
shutil.rmtree(PGC_DIR)
|
||||||
|
|
||||||
# clone pgc repo
|
|
||||||
git_clone_wrapper(PGC_REPO, PGC_DIR)
|
git_clone_wrapper(PGC_REPO, PGC_DIR)
|
||||||
|
|
||||||
# copy pgc conf
|
|
||||||
create_nginx_cfg(
|
create_nginx_cfg(
|
||||||
"PrettyGCode for Klipper",
|
"PrettyGCode for Klipper",
|
||||||
cfg_name=PGC_CONF,
|
cfg_name=PGC_CONF,
|
||||||
|
|||||||
Reference in New Issue
Block a user