From 23e38636434e371341aedfccc360de0cfa10b804 Mon Sep 17 00:00:00 2001 From: CodeDevMLH Date: Tue, 10 Dec 2024 01:08:02 +0100 Subject: [PATCH] fixes --- customize-WebUI.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/customize-WebUI.py b/customize-WebUI.py index 4e4ca36..543f61f 100644 --- a/customize-WebUI.py +++ b/customize-WebUI.py @@ -1,7 +1,5 @@ -from calendar import c import os import shutil -from tabnanny import check import yaml import re import sys @@ -25,7 +23,7 @@ def loadConfig(configPath): if not config: raise ValueError("Empty configuration file") - print("Configuration loaded successfully.\n") + print("Configuration loaded successfully.") return config except FileNotFoundError: print(f"Error: Configuration file not found at ./{configPath}") @@ -59,13 +57,13 @@ def copySources(config, destinationDirectory): # Check for absolute paths in target and correct them if necessary if os.path.isabs(checkTargetPath): targetPath = os.path.normpath(os.path.join(destinationDirectory, checkTargetPath.lstrip('./'))) - raise ValueError(f"Absolute path incorrect: Corrected {targetPath} to {targetPath}.") + raise ValueError(f"Absolute path incorrect: Corrected {checkTargetPath} to {targetPath}.") else: sourcePath = source - targetPath = os.path.join(destinationDirectory, os.path.basename(sourcePath)) - #targetPath = os.path.normpath(os.path.join(destinationDirectory, os.path.basename(sourcePath).lstrip('./'))) + #targetPath = os.path.join(destinationDirectory, os.path.basename(sourcePath)) + targetPath = os.path.normpath(os.path.join(destinationDirectory, os.path.basename(sourcePath))) # Check if source exists if not os.path.exists(sourcePath):