This commit is contained in:
MLH
2024-12-10 02:28:08 +01:00
parent 09e051b23e
commit a198729ba9

View File

@ -30,16 +30,16 @@ def loadConfig(configPath):
if not config:
raise ValueError("Empty configuration file")
print("Configuration loaded successfully.")
print(f"{Colors.GREEN}Configuration loaded successfully.{Colors.RESET}")
return config
except FileNotFoundError:
print(f"Error: Configuration file not found at ./{configPath}")
print(f"{Colors.RED}Error: Configuration file not found at ./{configPath}{Colors.RESET}")
sys.exit(1)
except yaml.YAMLError as e:
print(f"Error parsing YAML configuration: {e}")
print(f"{Colors.RED}Error parsing YAML configuration: {e}{Colors.RESET}")
sys.exit(1)
except ValueError as e:
print(f"Configuration error: {e}")
print(f"{Colors.RED}Configuration error: {e}{Colors.RESET}")
sys.exit(1)