From 343c21499ee0c0128db98aeaff307a09d4d4c1ad Mon Sep 17 00:00:00 2001 From: sitisll Date: Tue, 14 Feb 2023 16:42:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dodo.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dodo.py b/dodo.py index c9b7020..ddf646b 100755 --- a/dodo.py +++ b/dodo.py @@ -24,7 +24,7 @@ if x>0: def print_line(text): - "Добавление тире вокруг текста, потом сюда можно поместить и расскраску текста" + "Добавление тире вокруг текста, покраска" print(colorama.Fore.YELLOW + "-"*25) print(colorama.Fore.GREEN + text) print(colorama.Fore.YELLOW + "-"*25 + colorama.Style.RESET_ALL) @@ -58,7 +58,7 @@ create_dir(config_dodo) @dodo.command() def config(map_server=list_config): query_p = [] - port_s = [] + port_s = [] for i in map_server: with open(f"{home_dir}/.config/dodo/{i}", "r") as yamlfile: data = yaml.load(yamlfile, Loader=yaml.FullLoader) @@ -66,25 +66,22 @@ def config(map_server=list_config): port_s.append(data['Port']) query_p.append(data['QueryPort']) - - cluster_dir_override = "" cluster_id = "" count_cluster = check_int("""Укажите требуется ли кластер? 1. Да 2. Нет : """) - if count_cluster == 0: + if count_cluster == 0: # 0 возвращает функция chek_int, если ничего не было введено count_cluster = 2 if count_cluster == 1: cluster_server = True - else: - cluster_server = False - - if cluster_server == True: cluster_id = input("Укажите id для кластера, любое сочетание символов: \n") create_dir(dir_server + cluster_id) cluster_dir_override = (dir_server + cluster_id) + else: + cluster_server = False + if map_server != []: print("Уже установленные карты: ") @@ -92,7 +89,7 @@ def config(map_server=list_config): print(i) count_maps = check_int("Укажите количество карт: \n") - if count_maps == 0: + if count_maps == 0: # 0 возрвращает check_int когда, ничего не было введено count_maps = 1 for i in range(count_maps): while True: @@ -112,7 +109,7 @@ def config(map_server=list_config): 11. Lost Island 12. Fjordur : """) - if amount_map == 0: + if amount_map == 0: # 0 возрвращает check_int когда, ничего не было введено amount_map = i + 1 if 0