mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 17:39:25 +08:00
add: log non-existent configuration fields
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from module.config.deep import deep_get
|
||||
from module.config.full_config_generated import FullGeneratedConfig
|
||||
from module.logger import logger
|
||||
|
||||
|
||||
class AzurLaneFullConfig(FullGeneratedConfig):
|
||||
@@ -10,7 +11,10 @@ class AzurLaneFullConfig(FullGeneratedConfig):
|
||||
if item.find("_") == -1:
|
||||
return super().__getattribute__(item)
|
||||
path = item.replace('_', '.')
|
||||
return deep_get(self.config.data, path)
|
||||
result = deep_get(self.config.data, path)
|
||||
if result is None:
|
||||
logger.error(f"Config {path} not found !")
|
||||
return None
|
||||
|
||||
def __setattr__(self, key, value):
|
||||
if key.find("_") == -1:
|
||||
|
||||
Reference in New Issue
Block a user