Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a73ced0067 | ||
|
|
f89b91fe7f | ||
|
|
5950485d46 | ||
|
|
f349927a63 |
@@ -1,7 +1,7 @@
|
|||||||
# MARK: Project info
|
# MARK: Project info
|
||||||
[project]
|
[project]
|
||||||
name = "corelibs"
|
name = "corelibs"
|
||||||
version = "0.43.1"
|
version = "0.43.3"
|
||||||
description = "Collection of utils for Python scripts"
|
description = "Collection of utils for Python scripts"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ class SettingsLoader:
|
|||||||
Returns:
|
Returns:
|
||||||
dict[str, str]: key = value list
|
dict[str, str]: key = value list
|
||||||
"""
|
"""
|
||||||
|
# reset error message list before run
|
||||||
|
self.__error_msg = []
|
||||||
# default set entries
|
# default set entries
|
||||||
entry_set_empty: dict[str, str | None] = {}
|
entry_set_empty: dict[str, str | None] = {}
|
||||||
# entries that have to be split
|
# entries that have to be split
|
||||||
@@ -276,11 +278,9 @@ class SettingsLoader:
|
|||||||
error = True
|
error = True
|
||||||
self.__print(f"[!] Missing content entry for: {entry}", 'ERROR')
|
self.__print(f"[!] Missing content entry for: {entry}", 'ERROR')
|
||||||
if error is True:
|
if error is True:
|
||||||
|
self.__print("[!] Missing or incorrect settings data. Cannot proceed", 'CRITICAL')
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
self.__print(
|
"Missing or incorrect settings data. Cannot proceed: " + "; ".join(self.__error_msg)
|
||||||
"[!] Missing or incorrect settings data. Cannot proceed: " + "; ".join(self.__error_msg),
|
|
||||||
'CRITICAL'
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
# set empty
|
# set empty
|
||||||
for [entry, empty_set] in entry_set_empty.items():
|
for [entry, empty_set] in entry_set_empty.items():
|
||||||
|
|||||||
Reference in New Issue
Block a user