From e4d7640b2cbc69e2f809778c69108d9dba89d481 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Mon, 26 Sep 2022 16:53:08 +0300 Subject: [PATCH] v6.2.0.0 Changelog: https://roxy-wi.org/changelog#6_2_0 --- app/funct.py | 10 +++++----- app/modules/roxy_wi_tools.py | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/funct.py b/app/funct.py index 90615d8c..2406c660 100644 --- a/app/funct.py +++ b/app/funct.py @@ -122,7 +122,7 @@ def logging(server_ip: str, action: str, **kwargs) -> None: login = '' cur_date = get_data('logs') cur_date_in_log = get_data('date_in_log') - log_path = ('main', 'log_path') + log_path = get_config_var.get_config_var('main', 'log_path') if not os.path.exists(log_path): os.makedirs(log_path) @@ -344,7 +344,7 @@ def page_for_admin(level=1) -> None: def return_ssh_keys_path(server_ip: str, **kwargs): import sql - lib_path= get_config_var.get_config_var('main', 'lib_path') + lib_path = get_config_var.get_config_var('main', 'lib_path') ssh_enable = '' ssh_user_name = '' ssh_user_password = '' @@ -412,7 +412,7 @@ def get_config(server_ip, cfg, **kwargs): def diff_config(oldcfg, cfg, **kwargs): import sql cookie = http.cookies.SimpleCookie(os.environ.get("HTTP_COOKIE")) - log_path= get_config_var.get_config_var('main', 'log_path') + log_path = get_config_var.get_config_var('main', 'log_path') user_group = get_user_group() diff = "" date = get_data('date_in_log') @@ -550,7 +550,7 @@ def get_userlists(config): def get_backends_from_config(server_ip, backends=''): - configs_dir= get_config_var.get_config_var('configs', 'haproxy_save_configs_dir') + configs_dir = get_config_var.get_config_var('configs', 'haproxy_save_configs_dir') format_cfg = 'cfg' try: @@ -1268,7 +1268,7 @@ def show_roxy_log( return show_log(output, grep=grep) elif service == 'internal': - log_path= get_config_var.get_config_var('main', 'log_path') + log_path = get_config_var.get_config_var('main', 'log_path') logs_files = get_files(log_path, "log") user_group = get_user_group() user_grep = '' diff --git a/app/modules/roxy_wi_tools.py b/app/modules/roxy_wi_tools.py index cac191aa..2e98ea6f 100644 --- a/app/modules/roxy_wi_tools.py +++ b/app/modules/roxy_wi_tools.py @@ -1,5 +1,6 @@ from configparser import ConfigParser, ExtendedInterpolation + class GetConfigVar: def __init__(self): self.path_config = "/etc/roxy-wi/roxy-wi.cfg"