From 18f13d94ef4a34f5e4d3c237989933046e303731 Mon Sep 17 00:00:00 2001 From: OVERLORD7F Date: Thu, 18 Sep 2025 15:59:44 +0300 Subject: [PATCH] - Promts no longer case sensetive - hopefully removed circular import and warnings with get_iso_name / get_vm_name --- config_data_import.py | 10 +++++++--- domain_api.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/config_data_import.py b/config_data_import.py index 62ff794..ba35176 100644 --- a/config_data_import.py +++ b/config_data_import.py @@ -168,11 +168,15 @@ def config_import(config_relative_path): def change_startup_option(config_relative_path): cls() #console.print("[yellow bold]Skip start-up splash ?") - new_value = Prompt.ask("[yellow bold]Skip start-up splash ?[/]", choices=["Y", "N"], default="N") + new_value = Prompt.ask("[yellow bold]Skip start-up splash ?[/]", choices=["Y", "N"], default="N", case_sensitive=False) + if new_value == "Y" or new_value == "y": + startup_option = "yes" + if new_value == "N" or new_value == "n": + startup_option = "no" config = configparser.ConfigParser() config.read(config_relative_path) if config.has_section('General'): - config.set('General', 'skip_startup_splash', new_value) + config.set('General', 'skip_startup_splash', startup_option) with open(config_relative_path, 'w') as config_file: config.write(config_file) console.print(f"[green bold]Option set to: {new_value}") @@ -232,7 +236,7 @@ def change_vm_uuids(config_relative_path): #change selected VM uuids in config def config_edit(config_relative_path): - read_input = Prompt.ask("[bold yellow]Create new config file?[/]", choices=["Y", "N"], default="N") + read_input = Prompt.ask("[bold yellow]Create new config file?[/]", choices=["Y", "N"], default="N", case_sensitive=False) menu_choice = str(read_input) if menu_choice == "Y" or menu_choice == "y": base_url = input("Type SpaceVM Controller IP: ") diff --git a/domain_api.py b/domain_api.py index e2edf8d..2929557 100644 --- a/domain_api.py +++ b/domain_api.py @@ -3,7 +3,7 @@ import requests import secrets #for generating unique names import os import configparser -from config_data_import import * +#from config_data_import import * hopefully removes circular import and warnings with get_iso_name / get_vm_name from rich.console import Console , Align from rich.columns import Columns from rich.panel import Panel