mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 00:03:42 +05:00
refactor: unneccessary use of check_file_exist
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -22,7 +22,6 @@ from utils.constants import (
|
|||||||
COLOR_GREEN,
|
COLOR_GREEN,
|
||||||
COLOR_RED,
|
COLOR_RED,
|
||||||
)
|
)
|
||||||
from utils.fs_utils import check_file_exist
|
|
||||||
from utils.logger import Logger
|
from utils.logger import Logger
|
||||||
from utils.sys_utils import check_package_install, install_system_packages
|
from utils.sys_utils import check_package_install, install_system_packages
|
||||||
|
|
||||||
@@ -119,12 +118,8 @@ def get_install_status_webui(
|
|||||||
:param common_cfg: the required common_vars.conf
|
:param common_cfg: the required common_vars.conf
|
||||||
:return: formatted string, containing the status
|
:return: formatted string, containing the status
|
||||||
"""
|
"""
|
||||||
dir_exist = install_dir.exists()
|
status = [install_dir.exists(), nginx_cfg.exists()]
|
||||||
nginx_cfg_exist = check_file_exist(nginx_cfg)
|
general_nginx_status = [upstreams_cfg.exists(), common_cfg.exists()]
|
||||||
upstreams_cfg_exist = check_file_exist(upstreams_cfg)
|
|
||||||
common_cfg_exist = check_file_exist(common_cfg)
|
|
||||||
status = [dir_exist, nginx_cfg_exist]
|
|
||||||
general_nginx_status = [upstreams_cfg_exist, common_cfg_exist]
|
|
||||||
|
|
||||||
if all(status) and all(general_nginx_status):
|
if all(status) and all(general_nginx_status):
|
||||||
return f"{COLOR_GREEN}Installed!{RESET_FORMAT}"
|
return f"{COLOR_GREEN}Installed!{RESET_FORMAT}"
|
||||||
|
|||||||
Reference in New Issue
Block a user