configuration: the cache folder can now be specified in the configuration file

This commit is contained in:
2023-09-18 14:34:10 +02:00
parent 25fffb6fea
commit 80a1457dd1
5 changed files with 12 additions and 3 deletions
+2
View File
@@ -116,6 +116,7 @@ class Config:
"""
# all members have default values, so we can easily create
# a default configuration
cache: str = '.'
db: str = './db/'
ais: dict[str, AIConfig] = field(default_factory=create_default_ai_configs)
@@ -132,6 +133,7 @@ class Config:
ai_conf = ai_config_instance(conf['name'], conf)
ais[ID] = ai_conf
return cls(
cache=str(source['cache']) if 'cache' in source else '.',
db=str(source['db']),
ais=ais
)