mirror of
https://github.com/OVERLORD7F/SVMU.git
synced 2025-10-01 21:52:47 +03:00
- Promts no longer case sensetive
- hopefully removed circular import and warnings with get_iso_name / get_vm_name
This commit is contained in:
@@ -168,11 +168,15 @@ def config_import(config_relative_path):
|
|||||||
def change_startup_option(config_relative_path):
|
def change_startup_option(config_relative_path):
|
||||||
cls()
|
cls()
|
||||||
#console.print("[yellow bold]Skip start-up splash ?")
|
#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 = configparser.ConfigParser()
|
||||||
config.read(config_relative_path)
|
config.read(config_relative_path)
|
||||||
if config.has_section('General'):
|
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:
|
with open(config_relative_path, 'w') as config_file:
|
||||||
config.write(config_file)
|
config.write(config_file)
|
||||||
console.print(f"[green bold]Option set to: {new_value}")
|
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):
|
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)
|
menu_choice = str(read_input)
|
||||||
if menu_choice == "Y" or menu_choice == "y":
|
if menu_choice == "Y" or menu_choice == "y":
|
||||||
base_url = input("Type SpaceVM Controller IP: ")
|
base_url = input("Type SpaceVM Controller IP: ")
|
||||||
|
@@ -3,7 +3,7 @@ import requests
|
|||||||
import secrets #for generating unique names
|
import secrets #for generating unique names
|
||||||
import os
|
import os
|
||||||
import configparser
|
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.console import Console , Align
|
||||||
from rich.columns import Columns
|
from rich.columns import Columns
|
||||||
from rich.panel import Panel
|
from rich.panel import Panel
|
||||||
|
Reference in New Issue
Block a user